How to Find and Fix Minecraft Server Lag
Measure first. How to read TPS, profile with spark and change the settings that actually cost the server time.
MCRank Editorial · Published October 14, 2026 · Updated October 14, 2026
Lag has many causes and only one reliable method for finding them: measure, change one thing and measure again. Changing settings at random can leave you with a server that is worse and no idea why.
What lag actually is
The server tries to complete one tick, a full pass over the game world, twenty times a second. Each tick has about fifty milliseconds. When it takes longer, the server runs behind: blocks reappear, mobs stutter and commands take time to respond. The rate it actually achieves is called TPS, ticks per second, and twenty is perfect.
Not all lag is the server's. A player with a poor connection sees lag while TPS is fine, and a player with a weak computer sees low frames while both are fine. Check TPS first so you know whether the problem is yours.
Step 1: confirm it with spark
spark is a profiler that works on servers and proxies. Its commands report the numbers:
- /spark tps prints the server's TPS and CPU usage.
- /spark health shows TPS, CPU, memory and disk usage together.
- /spark gc prints the garbage collection history.
If TPS is below twenty during the problem, the server is the cause and you should profile.
Step 2: profile while it is happening
Start the profiler when the lag is present, not afterwards:
- /spark profiler start
- /spark profiler stop
Stopping it prints a link to a viewer. You can add --timeout followed by a number of seconds so it stops by itself, and --thread * to include every thread. The viewer shows which plugins and which parts of the game took the most time. Often a single plugin, a farm or a loaded area accounts for most of it, and fixing that is worth more than any setting.
Step 3: reduce what the server does
Once you know where the time goes, these are the standard levers. Change one at a time.
- Simulation distance in server.properties controls how far from players entities and block updates are processed. Both view distance and simulation distance default to 10. Lowering simulation distance reduces work without changing how far players can see.
- View distance controls how much world is sent to players, so lowering it reduces both server and network load.
- Mob spawns are configurable per world in Paper. The per-world configuration lists spawn limits per category, with -1 meaning the global value, and ticks-per-spawn to make spawn attempts less frequent. Its per-player-mob-spawns option, true by default, shares the cap between players rather than letting one player use it all.
- Hoppers are a common cost. Paper's per-world configuration documents options such as ignoring containers inside occluding blocks and applying a cooldown when a hopper is full. It also has an option that disables the hopper move event, which the documentation says improves hopper performance dramatically but breaks protection plugins, so think before enabling it.
- Chunk unloading can be delayed so frequently visited chunks are not constantly reloaded; the option defaults to ten seconds and trades memory for fewer reloads.
Step 4: remove exploration cost
Generating new terrain is expensive, and a group of players exploring in different directions can pull the whole tick down. A pregeneration plugin such as Chunky generates an area ahead of time, which you can do while nobody is online. Combine it with a world border so players cannot wander past what you generated.
Step 5: check the Java side
If spark shows long garbage collection pauses, the startup flags matter. The Paper documentation publishes a widely used set known as Aikar's flags and explains them. Its guidance includes setting the starting and maximum heap to the same value, leaving room for the operating system and for memory Java uses on top of the heap, and not allocating all of a shared host's memory.
Do not paste flags you do not understand. Read the page and compare the tick times before and after.
Step 6: keep a log of what you changed
Write down each change and the effect. Servers get slower again over time as worlds and plugin lists grow, and a log tells you what worked.
When settings are not enough
If the profiler shows the server doing necessary work, you have outgrown the machine or the design. Options are more CPU speed, because a single main thread still limits most servers, fewer entities per player, or splitting the server into several. Folia can use more cores but needs plugins written for it.
A community optimisation guide on GitHub explains Paper's settings in detail and is worth reading with the Paper reference open beside it.
This guide is editorial content. It is not advertising and it does not rank or endorse any resource.