
"The server is lagging" can mean a dozen different things. Guessing which plugin to remove wastes days. A profiler tells you in a few minutes, and spark is the one almost everyone uses. Recent Paper versions include it out of the box; on other server software, it's a free plugin.
Start with TPS and MSPT
Run:
/spark tps
You'll see two kinds of numbers:
- TPS (ticks per second). The server aims for 20. Below that, the game is running slower than real time.
- MSPT (milliseconds per tick). How long each tick actually takes. A tick has a budget of 50 ms: under it, the server keeps up; over it, TPS drops.
MSPT is the more useful number. A server at 20 TPS but 45 MSPT is close to the edge, and the next event or farm will tip it over. Watch the high percentiles too: a smooth average with spikes in the 95th percentile means short freezes players will notice.
Run a profile while the lag is happening
Profile during real load, not on an empty server at 4am:
/spark profiler start
Let it run for a few minutes while players are online, then:
/spark profiler stop
spark gives you a link to a viewer that shows where the server spent its time, as a tree you can expand.
Reading the result
Open the main server thread and expand the biggest branches. You're looking for what takes the largest share of each tick. The common culprits:
- Entity ticking. Mobs and dropped items. Usually farms, spawners and item piles.
- Chunk loading and generation. Players exploring new terrain, or a world that was never pre-generated.
- A specific plugin. Its name shows up in the tree, often in a scheduled task or an event listener.
- Redstone and hoppers. Large contraptions and long hopper chains.
If one plugin takes a large share on its own, check its settings first, then its updates. Many lag problems are a single misconfigured option.
Check memory and garbage collection
/spark health
shows memory use, CPU and disk at a glance. If memory sits near its limit, or the GC is running constantly, the startup flags or the amount of RAM may be the issue. See Aikar's flags explained.
Fixing what you find
- Too many entities: set entity limits in Paper's config, clear dropped items more often, and look at farms. Spawner farms are often the biggest single source.
- Chunk generation: pre-generate the world before launch with a pre-generator plugin, and set a world border.
- A heavy plugin: look for a lighter configuration, or a replacement that does the same job with less work.
Spawners without the entities
On survival and skyblock servers, spawner farms are one of the most common results in a profile. Every vanilla spawner creates real mobs, and every mob has to be ticked, pathed and killed.
EliteSpawner removes that cost entirely. Vanilla spawning is cancelled before a mob exists, drops go straight into storage, and every spawner shares one tick loop that only touches the spawners due that tick. Its own /esp debug stats command shows how much work spawners are doing, so you can see the numbers on your server. It runs on Paper, Purpur and Folia, Minecraft 1.20.6 and newer.
Get the tools from this guide
Built and tested on real servers, with updates included and support on Discord.
