Understanding TPS & MSPT
The numbers behind lag: ticks, tick time, CPU, memory and garbage collection.
TPS
TPS is ticks per second. The server aims for 20.0. Anything lower means the game runs slower than real time: mobs, redstone and farms all lag.
TPS dips
An average can hide short freezes. Chunk generation, backups and heavy plugin tasks cause dips. Schedule backups off-peak and pre-generate the world.
MSPT
MSPT is milliseconds per tick. Each tick has a 50 ms budget (1000 ms ÷ 20). If MSPT exceeds 50, TPS drops below 20. MSPT shows your headroom before TPS falls — keep it comfortably under 45.
CPU
The main game thread is single-threaded, so single-core speed matters most. A saturated or throttled CPU directly lowers TPS.
System memory
Leave 1–2 GB outside the Java heap for the OS and native memory. When the machine runs out of RAM the system swaps or the container is killed.
Java heap
The heap holds the world, entities and plugin data. A heap that stays near its maximum causes constant garbage collection and eventually an OutOfMemoryError.
Garbage collection
GC pauses freeze the main thread. Use G1GC with tuned flags (or generational ZGC on Java 21+) and set -Xms equal to -Xmx.
“Can't keep up!”
The server logs this when a tick took far longer than 50 ms. Profile with spark (/spark profiler) during the lag to find the cause.
Watchdog
The watchdog stops the server when a tick takes too long. The thread dump printed afterwards shows what blocked the main thread.
Capacity test
The capacity test estimates how many players your server can carry, even when nobody is online. Start it from Run diagnostics or from the Performance page. It needs the Tickhound plugin.
The plugin creates a temporary flat world and fills it with simulated players. Each one is a patch of loaded, ticking chunks with mobs and some block activity. While more are added step by step, the plugin measures how the tick time grows, using your real plugins and memory. It stops where the server gets uncomfortable (45 ms per tick) and estimates how many players fit, cautiously, and how many in ideal conditions.
/tickhound stresstest stop. Your real worlds are never touched; the test world is deleted afterwards.It does not simulate network traffic, world generation by exploring players or plugin events from real play, so treat the number as a careful estimate. Not available on Folia.
