Tree Host

How to Fix Minecraft Server Lag: TPS, MSPT and Fixes

Updated · by the Tree Host team

To fix Minecraft server lag, first measure it. Run /tps and /mspt on Paper or Purpur. A healthy server holds 20 TPS and each tick takes under 50 ms. If it doesn't, lower view-distance to 8 to 10 and simulation-distance to 6 to 8, pre-generate the world, clear dropped items and thin out mob farms. Then check memory and plugins.

What server lag actually is

A Minecraft server runs in ticks. It tries to do 20 ticks every second, so each tick has a budget of 50 milliseconds. Everything the world does fits in that budget: mobs moving, crops growing, redstone, hoppers, chunk loading and every plugin that runs code.

When one tick takes longer than 50 ms, the server falls behind. Players see blocks that come back after they break them, mobs that jump, and a delay when they open a chest. That is server lag. It is not the same as ping, which is the delay between a player's computer and the server. Both feel like lag, but they have different fixes.

TermWhat it meansHealthy value
TPSTicks per second the server manages20
MSPTMilliseconds one tick takesUnder 50 (aim for under 35)
PingRound trip from a player to the serverUnder 100 ms for most players
FPSFrames per second on a player's own computerNot a server problem

1. Measure before you change anything

Guessing wastes time. Spend two minutes on numbers first. Do this while players are online, because an empty server almost never lags.

On Tree Host the console has a TPS button, and the Performance tab charts memory, CPU and players over the last hour, 6 hours or 24 hours. A lag doctor on the same tab reads those numbers and explains what it finds in plain words. See the troubleshooting guide for more.

2. Lower view distance and simulation distance

These two settings in server.properties are the biggest levers you have. View distance is how many chunks around each player are sent to them. Simulation distance is how far from a player mobs, crops and redstone keep running. The default for both is 10.

The cost grows fast. A radius of 10 chunks means about 441 chunks around each player, and a radius of 8 means about 289. That is roughly a third less work for every player online.

Players rarely notice 8 instead of 12, but they notice lag. Our guide to server.properties explains both settings and the others that matter. On Tree Host you can change them in Settings under Game settings, with no file editing.

3. Pre-generate the world

Generating a new chunk is one of the most expensive things a server does. When players explore, the server must build terrain, caves, structures and biomes on the spot. This causes the long spikes where one tick takes 200 ms or more.

The fix is to generate the land ahead of time with the free Chunky plugin, while nobody is online. It works on Paper, Purpur, Spigot and Folia.

Generating the Nether and the End needs separate runs: switch with /chunky world world_nether and repeat. A 5,000 block radius can take a few gigabytes of disk, so check you have room first.

4. Clear dropped items and thin out mobs

Entities are things that aren't blocks: mobs, dropped items, item frames, minecarts and armor stands. Every loaded entity costs time every tick. Two things pile up the most.

On Paper you can also lower spawn limits and set an item merge radius in config/paper-world-defaults.yml. Change one value at a time and test, so you know what helped. Back up first: see how to back up a Minecraft server.

5. Check memory

Java slows down a lot when it runs low on memory, because it spends its time cleaning up instead of running the game. If memory use sits above about 90 percent, you will see stutters and eventually a crash with an out of memory error.

Remove heavy plugins or mods, lower view distance, or move to a bigger plan. Our guide on how much RAM a Minecraft server needs gives numbers for different player counts and plugin loads. More RAM does not fix a server that is slow because of CPU, so look at the CPU chart too.

6. Find the plugin or mod that is slow

If TPS is low even after the steps above, one plugin or mod may be doing too much work. Remove recently added ones first, then restart and test. Add them back one at a time.

The server software matters too. Paper and Purpur include many fixes that vanilla doesn't, and they are the usual choice for a plugin server. See Paper vs Purpur vs Fabric for how to pick.

A quick order of attack

Tree Host is built so the server isn't using the machine while nobody is online: it saves and stops after 15 minutes empty and starts when someone joins. See why Tree Host and the features for how the plans work.

Tree Host shows TPS, memory and CPU in the console and runs a lag doctor that explains slow servers in plain words.

More guides

← More guides