Find and fix lag
Lag almost always has a specific cause: chunk generation, too many entities, a heavy plugin or a farm. Measure first, then fix.
1. Check the TPS
Minecraft runs at 20 ticks per second (TPS). In the console, run:
spark tps
Paper 1.21 and newer include spark. On older versions, install the spark plugin. 20 TPS is perfect. Below about 18, players notice. Also check mspt (milliseconds per tick): under 50 is healthy.
If TPS is 20 but players still lag, the problem is their connection or their own PC, not the server.
2. Find the cause
spark profiler start
(wait 2–5 minutes while the lag is happening)
spark profiler stop
spark gives you a link to a report. Expand the biggest entries: they show which plugin, entity type or task is using the most time.
3. Pre-generate your world
Generating new chunks is the biggest cause of lag when players explore. Generate them ahead of time with the Chunky plugin, ideally when nobody is online:
worldborder center 0 0
worldborder set 10000
chunky radius 5000
chunky start
This makes a 10,000 × 10,000 block world and generates all of it. Bigger radiuses take longer and use more disk space. Run chunky progress to check, and repeat for world_nether with a smaller radius if you like.
4. Tune the distances
In server.properties:
view-distance=8
simulation-distance=6
View distance is how far players see. Simulation distance is how far away crops grow and mobs move. Lowering simulation distance saves the most and is hard to notice in play.
5. Limit entities
- Huge mob farms and piles of dropped items are common causes. The spark report will name the entity type.
- In
config/paper-world-defaults.yml, settings underentitiesandchunks(such as entity-per-chunk limits and item despawn rates) help on busy servers. Change a few values at a time and measure again.
6. Keep things tidy
- Restart once a day with a schedule.
- Remove plugins you don't use, and keep the rest updated.
- Never use
/reload. Restart instead.
Is it time to upgrade?
If the panel shows memory close to your limit all the time, or CPU at the top of your plan while spark shows no single cause, your server has outgrown its plan. open a ticket and we'll move you to a bigger one with your files kept.
Stuck?
Open a ticket in the client area and tell us what you've tried. We'll point you in the right direction.
Open a ticket