On this pageThree kinds of lag
"The server is lagging" describes three different problems that feel alike from inside the game. The server itself can fall behind, the connection between one player and the server can be slow, or one player's computer can struggle to draw the world. A fix for one does nothing for the other two, and most wasted evenings come from tuning the wrong one. This guide shows how to tell them apart, how to measure the server properly, and which changes help for each cause.
Three kinds of lag
| Kind | What players notice | Who feels it | Where to look |
|---|---|---|---|
| Server lag | Broken blocks reappear, mobs freeze then jump, crops and doors respond late | Everyone, at the same moment | Tick time on the server |
| Network lag | Actions land late, the player snaps back after moving, high ping in the player list | One player, or one region | The route between player and server |
| Client lag | Stutter and a low frame rate, even in singleplayer | One player | That player's computer |
The fastest triage question is whether everyone feels it at the same moment. If they do, the server is behind. If one person complains while others play smoothly, look at that person's connection or computer first.
Measure the server before changing anything
The server runs the world in ticks, 20 per second, which leaves 50 milliseconds for each one. As long as a tick takes less than that, the game keeps pace. Above 50 ms per tick, often written MSPT, the server falls behind and everyone feels it. Average values hide spikes, so look at the worst ticks as well.
tick query
mspt
spark tps
spark profiler start --timeout 300
tick query is built into vanilla and shows the target rate and how long recent ticks took. mspt is a Paper command with averages over several windows. spark, bundled with Paper and available as a mod for Fabric and NeoForge, reports both, and its profiler records where the time goes. Start the profiler when the lag is happening and leave it running; after five minutes it uploads a report and prints a link. Expand the main server thread and follow the largest share down: entities, chunk generation, block entities such as hoppers, or a named plugin or mod.
On a VPS, also check the host side with top. A high st value means steal time: the virtual machine waited for a physical CPU that was busy with someone else. A high wa value means the CPU waited on the disk. Neither shows up in game settings, and no amount of tuning fixes them.
Fixes for server lag, by cause
Chunk generation
If the profiler shows world generation and the lag follows players who explore, pre-generate the map. With the Chunky plugin or mod, from the console:
chunky world world
chunky center 0 0
chunky radius 5000
chunky start
worldborder set 10000
That generates every chunk within 5,000 blocks of the center, then sets a border 10,000 blocks across so nobody walks past the generated area. Run it when the server is quiet; it takes a while and uses disk space. Repeat it for the Nether and the End if players spend time there.
Entities
Mob farms, breeding pens and piles of dropped items are the usual source of entity load. spark shows which entity types cost the most, and on Paper paper entity list counts entities by type. Fix the source first, with rules for farm sizes or a cap on animals per pen. Paper then has settings that limit the damage:
# config/paper-world-defaults.yml (excerpt)
chunks:
entity-per-chunk-save-limit:
arrow: 16
experience_orb: 16
snowball: 8
collisions:
max-entity-collisions: 2
tick-rates:
behavior:
villager:
validatenearbypoi: 60
The save limits stop chunks from storing thousands of projectiles. Fewer collision checks per entity make crowded pens cheaper. Raising the villager interval makes villagers re-check their workstations and beds less often, which matters in large trading halls.
Redstone and hoppers
Large redstone builds and hopper chains tick constantly. Paper can swap in a faster redstone implementation and simplify hopper events:
# config/paper-world-defaults.yml (excerpt)
misc:
redstone-implementation: ALTERNATE_CURRENT
hopper:
disable-move-event: true
Alternate Current behaves like vanilla in nearly every build, but test technical contraptions after switching. Only disable the hopper move event if no plugin relies on it; some protection and logging plugins watch hopper transfers.
View and simulation distance
view-distance decides how many chunks players see, while simulation-distance decides how many chunks around each player are actually ticked: mobs, crops, redstone and fluids. Lowering the second is the strongest CPU lever there is:
view-distance=8
simulation-distance=6
Players still see far, while the world only runs near them. Farms keep working as long as someone is close enough.
Spikes every few minutes
Regular spikes usually mean saving or garbage collection. Paper spreads autosaves with chunks.max-auto-save-chunks-per-tick, so a high wa value during spikes points at slow storage. Spikes that match garbage collection in the spark report point at memory settings, which our Minecraft RAM guide covers, including when more memory will not help.
Plugins, mods and the CPU itself
When the profiler names a plugin or mod, update it, reconfigure it or replace it. When the report shows ordinary game work and the tick is still slow after the fixes above, the CPU core is the limit. A CloudSat High Frequency VPS runs on AMD Ryzen cores at 4.2 GHz or more, which is the kind of single-core speed the main game loop depends on.
Fixes for network lag
Ask the affected player to trace the route to the server and watch where delay or loss begins:
mtr -rw 203.0.113.10 # Linux and macOS
pathping 203.0.113.10 # Windows
- Loss in the first hop is the player's own network, often Wi-Fi. A cable fixes more than any setting.
- Loss or a jump in delay further along is the route between their provider and the server. If many players share it, a server in a region closer to them is the real fix.
- Everyone slows down at once while the server's tick time stays low points at the server's bandwidth. Check its traffic graph; an unexpected flood is a denial-of-service attack, which our guide to DDoS protection for game servers explains.
network-compression-threshold in server.properties trades CPU for bandwidth. The default of 256 bytes suits most servers; raising it saves CPU on a server with plenty of bandwidth.
Fixes for client lag
If the frame rate counter on the debug screen (F3 on Java) shows low numbers while others play fine, the problem is local. Lower the render distance, turn off shaders and fancy graphics, update the graphics driver, and on Java try the Sodium mod, which replaces the rendering engine. Make sure the launcher gives the game sensible memory, neither too little nor most of the computer's RAM.
Crowded bases hurt clients too. Hundreds of item frames, armor stands and mobs in view lower everyone's frame rate there. On the server, entity-broadcast-range-percentage in server.properties sends entities to clients from a shorter distance; a value of 75 is a gentle first step.
A five-minute triage
- Ask whether everyone feels it at the same time.
- If yes, run
tick queryormspt. Above 50 ms, start the spark profiler. - Check
topfor steal time and disk wait. - Follow the profiler to the cause: generation, entities, redstone, a plugin.
- If ticks are fast, trace the route for affected players, or check their frame rate.
FAQ
What is a good TPS and MSPT for a Minecraft server?
20 ticks per second, which means every tick finishes in under 50 ms. An average around 30 ms leaves headroom for busy moments. Sustained values above 50 ms mean the server is behind.
Will more RAM fix lag?
Only when the server is short of memory, which shows as constant garbage collection or out-of-memory errors. Most lag is CPU work in the main thread, and extra memory does nothing for it.
Why does lag spike every few minutes?
Usually autosaving or garbage collection. Check disk wait during the spike, and look for garbage collection in the spark report. Paper spreads chunk saves across ticks, which helps on large worlds.
Do plugins that clear entities help?
They hide the symptom. Wiping dropped items on a timer frees the server for a moment, but it also deletes players' drops and leaves the farm that caused the problem running. Find the source with spark and limit it instead.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




