MinecraftUpdated 2 min read

How to Find Lag With the spark Profiler

Install spark and run a profile to see exactly which plugin, mod or chunk is slowing your server down.

spark shows what your server spends its time on, so you can find the plugin, mod or area causing lag. It works on Paper, Fabric, Forge and NeoForge. (On Paper, spark replaced the old timings reports.)

Install it

Paper already includes spark from 1.21 onwards. Otherwise:

  1. Open Package Manager, click Browse packages, search for spark, and click Install.
  2. Package changes are queued and applied the next time the server starts, so restart it from Console when you're done.

Check the server's health

In Console, run:

spark health

It shows TPS (ticks per second; 20 is perfect) and MSPT (milliseconds per tick; under 50 means no lag), plus CPU and memory.

Run a profile

  1. Start the profiler while the lag is happening:
spark profiler start
  1. Let it run for a few minutes while players play normally.
  2. Stop it:
spark profiler stop

spark prints a link. Open it to see a breakdown.

Reading the result

Expand the Server thread tree. The biggest percentages point at the cause: a plugin name, a mod's package name, or something like entity ticking. Common culprits are huge mob farms, hoppers, chunk loaders and badly written plugins.

Tip

Send the link when you open a ticket about lag. It's the fastest way for us to help.