Finding what is actually causing lag

Performance & Lag Reviewed September 6, 2026 1 min read

Guessing which plugin causes lag wastes evenings. A profiler answers it in about five minutes, with a report that names the code by line.

Why it happens

A tick has 50 milliseconds to do everything. When something inside it takes longer, TPS drops. A profiler samples what the server is actually executing and tells you which task is consuming the time.

What to do

  1. Install spark

    It works on Paper, Spigot, Purpur, Fabric and Forge. Put the jar in plugins (or mods) and restart.

  2. Profile while the lag is happening

    Run /spark profiler start in game, let it run for a few minutes of real lag, then /spark profiler stop. Profiling an idle server tells you nothing.

  3. Open the link it gives you

    The report is a tree of what consumed tick time, sorted by cost. The top entries are your problem, and they are usually named after a plugin.

  4. Check memory separately

    /spark heapsummary shows what is filling memory. Useful when the symptom is periodic freezing rather than steady slowness.

How to confirm it worked

You have a plugin or task name and a percentage of tick time next to it. That is the thing to fix, update or remove.

Worth knowing

Very high percentages against Minecraft's own internals usually mean entities or chunk loading rather than a plugin. Those have their own articles in this section.