How to Fix Minecraft Server Lag: TPS, MSPT and Fixes
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.
| Term | What it means | Healthy value |
|---|---|---|
| TPS | Ticks per second the server manages | 20 |
| MSPT | Milliseconds one tick takes | Under 50 (aim for under 35) |
| Ping | Round trip from a player to the server | Under 100 ms for most players |
| FPS | Frames per second on a player's own computer | Not 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 Paper or Purpur, run
/tps. It prints three numbers for the last 1, 5 and 15 minutes. Anything under 20 means the server is behind. - Run
/mspt. It shows how long ticks take. If the average is near or above 50, the server is at its limit. - On vanilla 1.20.3 and newer, run
/tick query. It shows the average tick time and the target rate. - Ask a player who reports lag to press F3 in Java Edition and look at the ping. High ping with good TPS means the problem is their connection, not your server.
- Watch the console for
Can't keep up!lines. They tell you how many ticks the server fell behind.
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.
- Set
view-distance=8(or 10 if you have headroom). - Set
simulation-distance=6(or 8). - Restart the server so it reads the file.
- Test again with
/tpswhile players are 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.
- Install Chunky. On Tree Host, open the Plugins tab, click Browse and search for Chunky. Or follow how to add plugins to a server.
- Set a border so the server doesn't generate forever:
/worldborder set 10000makes a 10,000 block wide square. - Pick the world and radius:
/chunky world worldand/chunky radius 5000. - Start it with
/chunky start. Check progress with/chunky progress. - Let it finish before players log on. It uses a lot of CPU while it runs, so some lag during the run is normal.
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.
- Dropped items. Farms that drop items on the floor can leave thousands of them. Clear them now with
/kill @e[type=item], then collect farm output with hoppers into chests. - Mobs and animals. Big animal pens and mob farms are a common cause. Keep pens small and breed only what you need. Count entities with
/execute if entity @eto see the total.
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.
- Update every plugin. Old versions are a common cause of heavy ticks.
- Use plugins made for your server software and version. Plugins from Tree Host's Browse list are already filtered for your server.
- Be careful with plugins that scan the whole world or log every block change.
- If you use mods, Fabric has performance mods such as Lithium that make the tick faster without changing gameplay.
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
- Measure with
/tpsand/mspt. - Lower view and simulation distance.
- Pre-generate the world with Chunky.
- Clear dropped items and thin mob farms.
- Check memory and CPU.
- Test plugins one at a time.
- If it still lags, the plan may be too small for your player count.
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.