How to tell server lag from player lag, take a spark profile at the right moment, and use the report to pin down the exact plugin, farm or contraption eating your tick.
"The server is lagging" usually means one of three things: the server can't keep up, a player's computer is slow, or a player's connection is bad. Only the first one can be fixed on the server. Here's how to tell them apart and find the culprit with a profiler instead of removing plugins one by one.
| What players see | Most likely | How to check |
|---|---|---|
| Mobs stutter, broken blocks come back, chests open late for everyone | the server misses ticks | /tps, /mspt |
| Choppy picture for one player, smooth for others | that player's PC | FPS on the F3 screen |
| One player keeps rubber-banding | their connection | ping in the tab list |
| A short freeze every few minutes | garbage collection or autosave | /spark health, /spark gc |
| Lag in one spot of the map | a farm, redstone, a crowd of mobs | a profile and an entity count |
A server needs 20 ticks per second, which means at most 50 ms per tick. On Paper and Purpur, /tps shows the average over 1, 5 and 15 minutes and /mspt shows tick time. If TPS is 20 and MSPT sits well under 50, the server is fine and the problem is on the player's side.
spark shows where the main server thread spends its time. Recent Paper builds ship with it; on older versions you install it like any plugin. You need spark permissions or op.
/spark profiler start
/spark profiler stopYou can set the duration in seconds up front so you don't have to stop it. If the lag comes in rare spikes, add the flag that only records ticks longer than a given number of milliseconds, so normal ticks don't drown out the picture.
/spark profiler start --timeout 300
/spark profiler start --only-ticks-over 100The report is a call tree. You want the main thread, called Server thread. Expand the node with the largest percentage and keep going down until you hit a name that makes sense.
com.author.plugin. A plugin is eating the time. Look deeper at what exactly: an event handler, a timer task, a database call on the main thread.Look at the share of time, not how often a name shows up. A plugin at 3% is background noise. A plugin taking half of the laggy ticks is suspect number one.
| Command | What it shows |
|---|---|
/spark tps | TPS and tick times over several periods, CPU usage |
/spark health | a summary: TPS, MSPT, CPU, memory, disk |
/spark tickmonitor | reports ticks that run noticeably longer than usual |
/spark gc | how often and how long garbage collection ran |
/spark heapsummary | what's taking up memory when you run short |
Timings is the older built-in report from Spigot and Paper. Newer Paper versions deprecated and removed it in favor of spark. If you're on an old server version and spark won't run for some reason, you take a report like this:
/timings on
(wait a few minutes under load)
/timings pasteTimings measures in big blocks: plugin, event, task. spark goes deeper, down to the method. If you have the choice, use spark.
If the profile points to entities or contraptions, you need to find where they are. A vanilla command counts entities of a type across the server:
/execute if entity @e[type=minecraft:item]
/execute if entity @e[type=minecraft:villager]It answers with a count. Swap in armor_stand, minecart or hopper_minecart. Paper also has /paper entity list, which shows entities by type and the most crowded chunks. Then teleport there and have a word with whoever built the farm.
/kill @e without a type. It kills villagers, pets, armor stands, item frames and players too.spark takes the profile, and Cloud Panel doesn't replace it. It removes the running around. The main screen shows whether the server is up and how many players are online, next to the machine's disk and memory load. You send spark commands from the console in the same window, without joining the game or opening SSH.
Once you have a suspect, switch it off in the plugins section: the panel doesn't delete the jar, it moves it to a separate folder. Restart with a button, check TPS, bring the plugin back if it wasn't the one. Config edits you make while fixing lag go into the log and can be rolled back if things get worse.
/tps and /mspt checked.Server thread is expanded and the biggest node found.Console, server status and one-click plugin toggling in one window: 3 days free.
We have been building server builds, plugins and websites for Minecraft servers since 2022. A ready-made solution goes onto your hosting in an evening, and we install it for free.