Ticks, TPS and main thread on Minecraft: understanding server lag
Ticks, TPS and the main thread: these three ideas explain why a Minecraft server lags. A healthy server runs 20 ticks per second, one tick every 50 milliseconds. This guide explains how Minecraft slices time, why almost everything goes through a single thread, when TPS starts to drop, and how to find the cause with Spark.
If the console keeps showing "Can't keep up!", this is the message in question:
[Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 4681ms or 93 ticks behind
What exactly are ticks?
Minecraft runs on a loop that repeats nonstop. Each pass of the loop is called a tick. On every tick, the server recalculates everything happening in the world:
player actions (movement, clicks, blocks placed or broken);
the position of every entity, then sent back to each player;
mob spawning, AI and movement;
redstone and every other game mechanic.
A healthy server aims for 20 ticks per second, one tick every 50 milliseconds. This pace is what makes gameplay smooth. The "Tick" page of the Minecraft Wiki gives the full technical definition.
The main thread, why a single core does all the work
This is the part that surprises people most. The vast majority of game calculations go through a single thread, the main thread. At any moment, a single CPU core therefore does most of the work.
Take a zombie attacking a player. The server checks its position, computes the distance, finds a path, checks line of sight, applies damage. Everything happens in order, on the same thread, and the tick cannot move on before it is done.
That is why strong single-core performance matters far more for a Minecraft server than the total number of cores, especially with many entities or lots of redstone.
Recent versions move some work elsewhere: chunk generation and lighting, networking. But entities, AI and redstone stay on the main thread.
When everything is fine, the server breathes
Normally, each tick is computed in under 50 ms. If the server finishes early, it simply waits for the next tick to keep the pace.
For example, a 15 ms tick leaves 35 ms of headroom. Players feel no delay, mobs react at once, redstone responds immediately and the server stays at 20 TPS. This time per tick is called MSPT, for milliseconds per tick.
When it lags, the tick exceeds 50 ms
Trouble starts as soon as a tick takes more than 50 ms. Ticks do not run in parallel: the next one is delayed, and if it keeps happening, the delay builds up.
For players, the signs are clear: mobs teleport, broken blocks reappear before vanishing, redstone responds slowly, every action lags behind.
The "Can't keep up!" message appears when the server is more than 2,000 ms behind. If a single tick hangs for too long, the watchdog decides the server has crashed and stops it. This limit is set by max-tick-time in server.properties: 60000 ms by default, one minute.
A server can be "running" and still be unplayable. Players feel lag long before a real crash.
Why ticks become too long
The number one cause is an overloaded main thread: too much to compute in too little time. Since everything is redone 20 times a second, the smallest source of load multiplies fast. The usual culprits:
too many active entities: 500 zombies in one area means 500 times the AI, pathfinding and collision work every tick;
badly designed mob farms that cram hundreds of entities into a small space;
heavy redstone: a complex circuit running in a loop can hog the main thread on its own;
chunks kept loaded all the time, by hoppers, chunk loaders or AFK players in busy areas;
mass collisions: 50 chickens in a 2 by 2 space looks harmless, but it is a calculation nightmare for the server.
Lag only shows up when players are in one place? Look first for a farm, a big redstone circuit or a pile of entities there.
TPS, the server's health in one number
TPS, or ticks per second, measures how many ticks the server manages to produce each second. At 20 TPS, all is well. As soon as the server falls behind, TPS drops and the game slows down.
A simple formula to picture the effect:
(1000 - delay in ms) / 50 = TPS
If the server falls 250 ms behind over one second, it drops to (1000 - 250) / 50 = 15 TPS. Another way to see it: a 66 ms tick only leaves room for 15 ticks per second. In game, 15 TPS is already very noticeable. Below 10, it is nearly unplayable.
Measure TPS and MSPT
| Command | Server | Result |
|---|---|---|
/tick query | Java 1.20.3 and later, all | Target rate and average time per tick |
/tps | Paper, Spigot, Purpur | TPS over 1, 5 and 15 minutes |
/mspt | Paper, Purpur | Time per tick, average and maximum |
/neoforge tps | NeoForge | TPS and time per tick, per dimension |
/forge tps | Forge | TPS and time per tick, per dimension |
/spark tps | With Spark | TPS, MSPT and CPU load |
In the OuiPanel console, type these commands without the slash. The guide 150+ Minecraft commands covers /tick, which can also freeze or speed up the game.
Finding the cause with Spark
Knowing the server lags is one thing, knowing why is another. The most effective tool is Spark: it profiles the main thread and shows exactly what takes time each tick, whether a plugin, an entity or a game mechanic.
On Paper and Purpur, Spark has been bundled since 1.21: the console shows "[spark] Starting background profiler" at startup.
On Spigot, install it from the Plugins page in OuiPanel.
On Forge, NeoForge or Fabric, install the spark mod from the Mods Manager.
spark profiler start
# Let it run for a few minutes while players play
spark profiler stop
Type these lines in the OuiPanel console. When stopped, Spark gives a link to its report. A few minutes of profiling are usually enough to find the culprit, instead of guessing.

The Live stats card, to the right of the console, shows memory and CPU use. It does not show TPS: use the commands above for that.
To cut the load once you know the cause, see the guides Minecraft server optimization for Paper and Spigot, and NeoForge Minecraft mods for a modded server.
Need help?
Open a ticket from Tickets › Open a Ticket, or from the Contact support tile at the bottom of your server's page in the client area. You can also ask your question on the OuiHeberg Discord.
Discover our Minecraft hosting plans starting from $2.28/month with automatic mod installation.
Minecraft server hosting →