Your server lags, you ran spark, and now you are staring at a flame graph with ten thousand Java frames in it. Lag Explainer reads that report for you and says what is going on, in a few lines of plain English.
/lagexplain https://spark.lucko.me/AbCdEf1234
Lag Explainer: Forge (MC 1.20.1), 60 s profile, 1139 ticks
Verdict: the server is LAGGING. TPS ~18.9 of 20, ticks take ~23.2 ms on average (limit 50 ms).
Plugins / mods:
- library_of_exile eats 33% of tick time (~7.7 ms/tick), mostly chunk loading, unloading & generation (hottest code: MapGenerationUTIL.spawnStructure)
Where the tick time goes:
- Chunk loading, unloading & generation: 32% (~7.5 ms/tick)
- Entities (mobs, items, players): 24% (~5.6 ms/tick), mostly Zombie (36%)
- Player connections & entity tracking: 21% (~4.8 ms/tick)
- Mob spawning: 8% (~1.8 ms/tick)
Tip: players are loading or generating new chunks. Pre-generate the world or lower view distance.
(That is a real report from a real modpack server.)
How to use it
/spark profiler start, let the lag happen for a minute, then/spark profiler stop./lagexplain <the link spark prints>(or/lagx). Ops only (permission level 2, orlagexplainer.useon Bukkit).
The report can come from any server. You can explain a Paper report on a Fabric server and the other way round.
What it tells you
- Which plugin or mod costs how much of the server tick, in percent and in milliseconds per tick, and the hottest piece of its code.
- What kind of work it is: entities, block entities, chunk generation, redstone and other block updates, mob spawning, world saving, player connections.
- Which vanilla type dominates: hoppers, zombies, item entities and so on.
- Whether the server is actually lagging, and if TPS is low while ticks are cheap, that the cause is spikes or pauses rather than steady load.
It is careful about blame. Mods that only wrap vanilla work (crash guards like Neruina, the loader's own event hooks) are not charged for what runs inside them. Performance mods like Lithium and C2ME are marked as such: time spent in them is vanilla work done faster, not extra lag.
What it can't tell you
Coordinates. spark samples call stacks; it never records where in the world the work happened, so no tool can get them out of a spark report. If you need "which chunk", use a tool that measures the world directly.
Privacy
Everything is computed on your server. No AI service, no API key, no telemetry. The only network request is downloading the report from spark's own server (spark-usercontent.lucko.me), and only links to spark's hosts are accepted.
Platforms
One file per loader, each covering every game version listed:
| File | Runs on |
|---|---|
lag-explainer-bukkit |
Bukkit, Spigot, Paper, Purpur, Folia 1.12 – 26.3 |
lag-explainer-fabric |
Fabric 1.14.4 – 26.3 (needs Fabric API) |
lag-explainer-forge |
Forge 1.13.2 – 26.3 |
lag-explainer-forge-1.12 |
Forge 1.12 – 1.12.2, Cleanroom |
lag-explainer-neoforge |
NeoForge 1.20.2 – 26.3 |
Server-side only, players don't need it. It also works in singleplayer.
Tested on real servers: Fabric 1.14.4, 1.16.5, 1.18.2, 1.20.1, 1.21.11, 26.3; Forge 1.12, 1.12.1, 1.12.2, 1.13.2, 1.14.4, 1.16.5, 1.18.2, 1.20.1, 26.2; NeoForge 1.20.4, 1.21.1, 26.3; Paper 1.12, 1.12.1, 1.12.2, 1.16.5, 1.20.4, 26.3; Folia 26.3.