EndyStudio

spark profile analyzer

Paste the link from /spark profiler and get your server's TPS and tick times, a list of what to change in Java, the server's config files and plugins, and the time each plugin takes out of every tick.

  • Free
  • No account
  • Runs in your browser

spark profile

How to get the link

  1. Run /spark profiler start on the server. spark comes with Paper and Purpur since 1.21; on other servers, install the spark plugin or mod first.
  2. Let it record for at least 5 minutes, with players online.
  3. Run /spark profiler stop and paste the link it gives you here.

The profile is downloaded straight from spark.lucko.me into your browser. It never goes through our server.

What the analyzer checks

spark records what the server was doing many times per second, and uploads it together with the server’s numbers and config files. The analyzer reads all of it and goes through four things:

  • How the server is doing. TPS and MSPT over the last minutes, CPU, memory, players and loaded entities, and a bar per minute so you can see when it got slow.
  • Java and the machine. The heap size, the garbage collector and whether it uses Aikar’s flags, full garbage collections, memory left after collecting, CPU threads, and whether the machine is short of memory or busy with other things.
  • Settings. view-distance and simulation-distance in server.properties, spawn limits in bukkit.yml, entity activation ranges in spigot.yml, and Paper’s and Purpur’s options for explosions, redstone, collisions, spawners, hoppers, armor stands and villagers. Each finding says which file and key to change.
  • Plugins. The time each plugin takes on the main thread, plugins that tend to cause trouble (ClearLag, PlugMan, mob stackers), and the chunk with the most entities, with a /tp command to go there.

Findings are sorted from what to fix first to optional tips. While the server keeps up, setting changes show as tips: they free time you don’t need yet.

How to make a spark profile

  1. Run /spark profiler start in the console or in game. On Paper and Purpur 1.21 and newer, spark is already built in.
  2. Let it record for at least 5 minutes at a normal time, with players online. A profile of an empty server only shows an idle server.
  3. Run /spark profiler stop. spark uploads the profile and prints a https://spark.lucko.me/… link.
  4. Paste the link above. The analysis starts on its own.

For lag that comes in spikes rather than all the time, record only the slow ticks: /spark profiler start --only-ticks-over 100 keeps ticks that took over 100 ms and ignores the rest.

TPS and MSPT

The server runs the world in ticks, 20 per second, so each tick has 50 ms. MSPT (milliseconds per tick) is how long a tick really took. While it stays under 50, the server holds 20 TPS and has time to spare. Once ticks take longer, TPS drops, and mobs, redstone and crops slow down for everyone.

MSPT What it means
Under 30 ms Plenty of room for busy moments
30 – 45 ms Fine, but with little margin
45 – 50 ms At the limit: any spike shows
Over 50 ms The server falls behind and TPS drops

The analyzer looks at the 95th percentile, the time 95 % of ticks stayed under. An average hides slow ticks; the 95th percentile doesn’t.

Reading the time per plugin

The plugin list adds up the time spent inside each plugin’s code on the main thread and divides it by the ticks recorded, so it reads in ms per tick, against the 50 ms each tick has. A plugin taking 5 ms per tick uses a tenth of the budget on its own. Time a plugin spends calling another plugin counts for the one it calls, the way spark’s own viewer counts it.

What’s left after the plugins is the game itself: entities, chunks, redstone and players. The settings findings are aimed at that part. To see exactly which task of a plugin takes the time, open the profile in spark’s viewer and switch to the Sources view.

The changes that usually help most

  • Lower simulation-distance to 5 or 6, and view-distance to around 8. Simulation distance decides how much of the world ticks around each player, so it weighs on every tick.
  • Lower entity activation ranges in spigot.yml, so mobs far from players tick less often.
  • Use Paper’s options: optimize-explosions, the ALTERNATE_CURRENT redstone implementation, max-entity-collisions of 2 and a spawner tick rate of 2.
  • Start Java with Aikar’s flags and a heap that fits the server. The RAM calculator writes both for you.
  • Pre-generate the world with a plugin such as Chunky, so new chunks aren’t generated while people play.

Change one thing at a time and record a new profile afterwards. That way you know what helped, and what to undo if a farm stops working.

Your profile and privacy

The analyzer runs in your browser: the profile is downloaded straight from spark.lucko.me and never goes through EndyStudio. Keep in mind that a spark profile includes your server’s config files (spark hides passwords, IPs and similar keys), and that anyone with the link can open it.

Frequently asked questions

How do I make a spark profile?

Run /spark profiler start on the server, let it record for at least 5 minutes while players are online, then run /spark profiler stop. spark uploads the result and gives you a spark.lucko.me link. Paste that link into the analyzer.

Does spark come with Paper?

Yes. Paper, and forks such as Purpur, include spark since Minecraft 1.21, so the /spark command works without installing anything. On Spigot, Fabric, Forge, NeoForge, Velocity or BungeeCord, install the spark plugin or mod first.

What is a good MSPT?

Each tick has 50 ms. Under 30 ms leaves plenty of room, 30 to 45 ms is fine but tight, and once ticks regularly go past 50 ms the server can no longer keep 20 TPS and players feel lag.

Is my profile sent to EndyStudio?

No. Your browser downloads the profile straight from spark.lucko.me and analyzes it on your computer. Nothing goes through our server and nothing is stored. Note that anyone with a spark link can open it, including your server's config files.

Why doesn't the analyzer show a plugin breakdown?

The breakdown comes from spark's call tree, which only profiles from /spark profiler have. A health report (/spark health) or a heap summary (/spark heapsummary) doesn't include it.

The analyzer says everything is fine, but players still lag. Why?

Lag on the player's side isn't always the server. If TPS stays at 20 and ticks are short, look at the connection (ping, packet loss, the proxy) or at the client's own frame rate. If the lag comes in short bursts, record only the slow ticks with /spark profiler start --only-ticks-over 100.