How to Fix Minecraft Server Lag: Find the Cause, Then Fix It
Most Minecraft lag comes from entities, chunk loading, or one heavy plugin, not RAM. Measure with spark, then apply the Paper settings that actually move TPS and MSPT.
How to Fix Minecraft Server Lag: Find the Cause, Then Fix It
Short answer: server lag almost never means "not enough RAM". It means ticks are taking longer than 50 milliseconds. To fix it, measure which part of the tick is slow (entities, chunks, or a plugin), then change the setting that controls that part. This guide shows how to do that on Paper, in the order that usually pays off fastest.
Lag has three different meanings
Players say "lag" for three unrelated problems, and each has a different fix.
- Low TPS (server lag). The server cannot finish a tick in 50 ms, so the game slows down. Mobs stutter, blocks reappear after breaking, and the day cycle crawls. This is a server problem and is what most of this guide covers.
- High ping (network lag). Everything is smooth but delayed. This is distance or routing between the player and the host. No server setting fixes it. Choosing a host in the right region does.
- Low FPS (client lag). The player's own computer is struggling. Lowering render distance on the client helps, and nothing on the server will.
Check which one you have before changing anything. /tps or /mspt on Paper shows the server side. If TPS is a steady 20 and players still complain, it is ping or FPS.
Step 1: measure with spark
Guessing is how people end up copying fifty config tweaks and fixing nothing. spark is a free profiler plugin that tells you where tick time is going. Install it in plugins/ (some server jars bundle it already), restart, and run:
/spark tps
/spark healthreport
/spark profiler start --timeout 120The profiler runs for 120 seconds and then gives you a link to a report in your browser. Run it while the lag is happening, not at 4 a.m. when nobody is online.
In the report, open the "Server thread" and look at what sits at the top:
- A plugin name high in the list means that plugin is the problem. Update it, reconfigure it, or replace it.
- Entity ticking high means too many mobs, items, or minecarts.
- Chunk loading or generation high means players are exploring new terrain faster than the server can generate it.
- Hopper ticking high means too many hoppers, usually in farms and storage systems.
This one report decides which of the sections below you need. Skip the rest.
Step 2: lower view and simulation distance
Two settings in server.properties have an outsized effect:
view-distance=8
simulation-distance=6view-distance is how many chunks around each player are sent to them. simulation-distance is how many chunks around each player are actually ticked (mobs move, crops grow, redstone runs). Since Minecraft 1.18 these are separate, which is useful: players can still see far while the server only does work nearby.
The defaults are 10 and 10. Dropping simulation distance to 5 or 6 is one of the cheapest big wins, because the number of ticked chunks grows with the square of the distance. Going from 10 to 6 cuts the ticked area to roughly a third. Players rarely notice, because anything they are actively near still works.
Step 3: control mob and entity counts
Entities are the most common cause of sustained low TPS on survival servers. Cows in a pen the size of a house, item frames everywhere, and mob farms that never get emptied add up.
In bukkit.yml you can lower the mob caps:
spawn-limits:
monsters: 50
animals: 8
water-animals: 3
ambient: 1Lower caps mean fewer mobs spawn per player. Paper spawns mobs per player rather than globally by default, so these numbers apply around each player.
In config/paper-world-defaults.yml (Paper 1.19 and later), look at the entity sections. Useful options include despawn-ranges (how far from a player mobs despawn), per-player-mob-spawns (leave it true, so one player in a farm area cannot use up the cap for everyone) and entity-per-chunk-save-limit (caps how many of certain entities, such as experience orbs and arrows, get saved per chunk, which stops runaway entity piles).
Setting names move between Paper versions, so search the generated file for the setting rather than trusting a path from an old guide. Each setting is documented in the Paper docs for your version.
For farms and animal pens, the fix is a server rule: a limit of animals per chunk, enforced by a plugin or by clear rules. A single chunk holding 150 chickens will cost you more than the rest of the map put together.
Step 4: pregenerate the world
Generating new terrain is expensive. If players are running into unexplored land, every new chunk is created while they wait, and TPS drops each time. The fix is to generate it ahead of time, while the server is quiet, with the Chunky plugin:
/chunky world world
/chunky center 0 0
/chunky radius 5000
/chunky startPregenerating a 5,000 block radius takes a while and uses disk space, so decide how big your world should actually be. Combine it with a world border so players cannot leave the pregenerated area. Exploring then costs only chunk loading, which is much cheaper than generation.
Step 5: tame hoppers and redstone
If the profiler showed hoppers, redstone, or tile entities, these are the usual culprits:
- Hoppers. Every hopper checks for items many times per second. In
spigot.yml,ticks-per.hopper-transferandticks-per.hopper-checkcontrol how often. Raising them slows hoppers slightly and saves a lot of time on servers with big storage systems. - Redstone clocks. Very fast clocks that run forever are a common cause. Use a spark report to find the chunk, then talk to the owner.
- Item entities on the ground. Items that never despawn pile up. Paper's
alt-item-despawn-ratelets you make specific items such as cobblestone despawn faster.
Step 6: audit plugins
If one plugin dominates the profile, you have three options: update it, find a setting that reduces its load, or replace it. The most common offenders are plugins that run something every tick that could run every second or every minute: scoreboards that refresh constantly, hologram plugins with huge numbers of lines, and anti-cheat checks.
A good rule is to remove plugins you do not understand. Every plugin you keep should be one you can explain in a sentence. Plugins that have not been updated for your Minecraft version are the first ones to check.
Step 7: check Java and your jar
Two basics that matter more than clever flags:
- Use a current Java version. Minecraft 1.20.5 and later need Java 21.
- Use Paper (or a Paper fork). Paper has performance work that the vanilla and Spigot jars do not. If you are on the vanilla server jar, switching to Paper is usually the single biggest improvement you can make.
JVM flags such as Aikar's can reduce garbage collection pauses, but only if garbage collection was your problem. Measure first. Our Aikar's flags guide shows how to tell.
What about giving it more RAM?
Adding RAM does not fix a slow tick. A small survival server often runs fine on 4 to 6 GB. Giving a server far more memory than it needs can even make garbage collection pauses longer. Add memory when you see the server running out of it, with out-of-memory errors or constant GC activity in the spark health report, not when TPS is low.
A realistic checklist
- Run
/spark healthreportand a two minute profile during lag. - Lower
simulation-distanceto 5 or 6, andview-distanceto 8. - Lower mob caps and add animal-per-chunk rules.
- Pregenerate the world and set a world border.
- Fix whatever the profiler named: a plugin, hoppers, or a redstone clock.
- Confirm you are on Paper and a current Java version.
- Re-run the profile and compare.
Change one thing at a time and measure after each change. That is how you learn which change worked.
Frequently asked questions
What is a good TPS for a Minecraft server?
20 TPS is perfect. Anything that stays at 19 or above feels fine. If it regularly drops under 18, players notice, and under 15 the server feels broken.
What is MSPT and why does it matter more than TPS?
MSPT is milliseconds per tick. TPS is capped at 20, so it hides how much headroom you have: a server at 20 TPS could be using 10 ms per tick or 48 ms per tick. MSPT shows you how close you are to the limit of 50 ms.
Does more RAM reduce lag?
Only if the server is actually out of memory. Most lag is CPU-bound on a single thread, so a faster CPU helps more than more RAM.
Will lowering view distance hurt the experience?
Lowering simulation distance hurts the least. Players still see far, but only nearby chunks are ticked. Lower view distance as well if you need more.
Why is my server lagging with only a few players online?
Usually a loaded chunk is doing too much work: a large farm, a mob grinder, a plugin task, or a chunk full of entities. Profile it and look at what is at the top.