Lodehost logoLodehost

Performance and fixes

Find out what is lagging your Minecraft server with spark

Players say the server lags, and that can mean many things: blocks that pop back after mining, mobs that stutter, chat that arrives late, or a server that freezes every few minutes. Guessing at the cause costs evenings. spark measures what the server is actually busy with, down to the plugin or the part of the game that eats the time, and every Paper server since 1.21 already has it.

6 min read

A row of tick bars with one long spike under a magnifying glass
Every tick has 50 milliseconds. spark shows which work pushed a tick past that.

Server lag or connection lag?

A Minecraft server runs its world in ticks, twenty per second when all is well, which leaves 50 milliseconds for each tick. Server lag means ticks take longer than that, and everyone online feels it at the same moment. Connection lag lives on one player's route to the server, and only that player feels it.

What players noticeMost likelyCheck with
Everyone at once: mobs freeze, broken blocks come back, crops stopServer lagspark tps
One player rubber-bands while the rest play fineThat player's connectionspark ping
The whole server stalls for seconds, every few minutesA lag spike or memory pausesspark gc and a spike profile
Only while someone explores new landTerrain generationThe pre-generation guide
Profile Minecraft server load with spark and compare changes
Record while the problem is happening, identify expensive work, then change one thing and compare. The bars illustrate the process and are not benchmark results. View larger.

Read the tick times first

Console

spark tps

In the console the command goes without a slash; in the game you type /spark tps and need operator rights or the spark permission. The answer shows the ticks per second over several recent periods, how long ticks took, and how busy the processor was.

Tick durationWhat it means
Clearly below 50 msRoom to spare. The server keeps up with 20 ticks per second.
Close to 50 msAt the limit. One busy moment tips it over.
Above 50 msThe server falls behind and the tick rate drops below 20.
A normal middle value with a very high maximumSpikes: most ticks are fine and a few are very slow.

The tick rate alone hides a lot, because it never goes above 20. A server at 20 ticks per second whose ticks take 48 milliseconds is one farm away from lag. The durations show that; the tick rate does not.

Profile the lag while it happens

  1. Wait for the lag

    A profile of a quiet server shows nothing useful. Start it on a busy evening, or while players stand near the build that seems to cause the trouble.

  2. Start the profiler

    Type spark profiler start --timeout 300 in the console. spark samples what the server is doing for five minutes and then stops by itself.

  3. Keep playing as usual

    Do not restart or change settings while it records, or the profile mixes two different situations.

  4. Open the report

    When the profile ends, spark prints a link to a viewer page. Open it in a browser; there is nothing to install.

Console

spark profiler start --timeout 300
spark profiler info
spark profiler stop

spark profiler info tells you whether a profile is still running. spark profiler stop ends it early and prints the link, and spark profiler cancel throws the recording away without a report.

Catch spikes instead of averages

When the server runs fine most of the time and freezes now and then, an ordinary profile averages the freezes away. Record only the slow ticks instead:

Console

spark profiler start --only-ticks-over 100 --timeout 600

This keeps only ticks that took longer than 100 milliseconds, twice the normal budget, for ten minutes. Whatever shows up in that report is what the freezes have in common.

For stalls of several seconds, run spark gc as well. It lists recent garbage collections and how long each one paused the server. Long pauses there point at memory pressure rather than a heavy plugin, and the RAM guide explains what to do about that.

Reading the report

  • Start at the server thread. Open Server thread and keep opening the child with the highest percentage.
  • Look for names that are not the game. A plugin appears under its own package name, deep in the tree. The Sources view adds up the time per plugin or mod, which is often the quickest answer.
  • Entities. A large share spent ticking entities means too many mobs or items in loaded chunks: farms, villager halls, item piles.
  • Block entities. Hoppers, furnaces and other working blocks in large numbers show up here.
  • Chunk loading and generation. Players exploring new land or flying fast with an elytra.

Share the link, not a screenshot

The viewer link holds the whole tree. When you ask a plugin author or our team for help, send that link; a screenshot only shows the branch you happened to open.

A quick health check

Console

spark health
spark heapsummary

spark health puts the main numbers on one screen: tick rate, tick durations, processor and memory use. It is the first thing to run when someone reports lag and you only have a minute.

spark heapsummary goes a step further for memory and lists which kinds of objects fill it. Counting them pauses the server for a moment, so run it when few players are online.

What the usual culprits look like

Found in the reportUsual causeWhat to do
Entity ticking around one baseA mob farm or villager hall that kept growingShrink it, or lower the spawn limits in bukkit.yml
Hoppers and moving itemsLong hopper chains and item sortersFewer hoppers, or water streams for transport
One plugin's packageThat plugin, often a task on a timer or on every player moveUpdate it, check its settings, or replace it
Chunk generationPlayers exploring new landPre-generate the world and set a world border
Long pauses in spark gcMemory pressureCheck heap use against the size of your plan

A lower view and simulation distance helps against almost all of these, because it shrinks the area the server keeps alive around every player.

spark on other server types

Paper and Purpur include spark from 1.21 on. On Fabric, Forge and NeoForge it is a mod you add to the server, and the commands are the same. A vanilla server cannot load it; to profile a vanilla world, run the same world on Paper for an evening and measure there.

Written and checked by the Lodehost team, last reviewed on 14 September 2026.

FAQ

Questions about finding lag

What is a good MSPT for a Minecraft server?

Anything clearly below 50 milliseconds per tick. Close to 50 the server is at its limit, and above 50 the tick rate drops below 20.

Does spark slow down the server?

Hardly. The profiler samples the server every few milliseconds, which costs very little, so it is safe on a live server. A heap summary is the exception and pauses the server for a moment.

Do I need to install spark on Paper?

No. Paper and Purpur ship with spark from 1.21 on. On older versions, and on Fabric, Forge or NeoForge, you add it yourself.

Why do players feel lag when the server shows 20 TPS?

The tick rate cannot go above 20, so it hides ticks that nearly miss their budget and short spikes. Check the tick durations in spark tps and run a spike profile. When the ticks are fine, the lag usually sits in one player's connection.

Can spark show which player causes the lag?

Not by name, but it shows the cause, and a cause usually has an owner: a farm, a machine or a plugin feature someone uses. Compare the report with where players were when the lag started.

Measure first, then fix what the numbers show.

Paper and Purpur ship spark from 1.21 on, and the Console tab takes its commands without a slash.

Compare the plans