PACKYARDStart your server

How to Use spark on a Minecraft Server (2026 Guide)

Published

Short answer: install spark (Paper 1.21+ already has it), run /spark tps and /spark health to see whether the problem is the tick or the memory, then /spark profiler start --timeout 300 while the lag is happening. Open the link it posts, switch to the Sources view, and the mod or plugin using the most tick time is at the top.

This guide covers the commands that matter, the flags worth knowing, and how to read the result without being a Java developer. Commands are from spark's own command docs; versions are from spark's Modrinth page as of November 2026.

Step 1: get spark on the server

Server typeWhat to do
Paper 1.21 and newerNothing. Paper bundles spark (Paper docs).
Paper 1.20.x and older, SpigotPut the spark plugin jar in plugins/ and restart.
Fabric, Forge, NeoForgePut the spark mod jar for your loader and Minecraft version in mods/ and restart. Players don't need it.

Pick the build that matches your Minecraft version exactly. The newest builds (1.10.187, September 2026) are for 26.x. For 1.21.1, the most common modded version, the newest builds are 1.10.124 for NeoForge and 1.10.109 for Fabric and Forge. Some packs already include it: All the Mods 10 ships spark 1.10.124, so check your mods folder before adding a second copy.

On Paper, if you want a newer spark than the bundled one, drop the plugin in plugins/ and start the server with -Dpaper.preferSparkPlugin=true.

Run commands as an operator in game, or from the server console without the slash. On a Packyard server that's the console in the panel.

Step 2: the 30-second check

/spark tps
/spark health
/spark gc

How to read the three together:

What you seeWhat it meansWhere to go next
TPS under 20, MSPT over 50 ms, memory fineThe main thread can't keep up (CPU, worldgen, machines, mobs)Step 3, the profiler
Memory near the limit, frequent or long GCThe heap is too small, or something is leakingOur out-of-memory crash guide
TPS 20, MSPT low, players still lagNetwork or the player's own PC/spark ping, and the player's client
TPS fine most of the time, short freezesSpikes: one heavy tick now and thenStep 3 with --only-ticks-over

Most of the time it's the first row. Minecraft runs the world on one main thread, so a server can have gigabytes of free RAM and still lag.

Step 3: run the profiler

The profiler samples what the server is doing every few milliseconds and uploads a report you open in the browser.

/spark profiler start --timeout 300

That records for 5 minutes and then posts a link. Run it while the lag is happening: get players online, or go and do the thing that lags (fly into new chunks, turn on the factory, walk into the mob farm). A profile of an empty, idle server tells you nothing.

The other ways to run it:

Flags worth knowing:

The uploaded report includes your mod or plugin list and system details, and anyone with the link can open it. Share it with the people helping you, not in a public channel you don't trust.

Step 4: read the report

Open the link. The spark viewer lists threads first; click Server thread, which is the main game thread.

Use the Sources view first. Click the eye icon in the top bar and pick Sources. It splits the time by mod or plugin, so the top entry is the one costing the most. That's usually enough to know where to look.

Then use the All view (the default tree) to see what inside the game is slow. Click a line to expand it and keep following the biggest percentage down. Each line shows a share of the thread's time, and hovering shows the milliseconds. Ignore time spent sleeping or "parked": that's the server waiting for the next tick, which is healthy.

What the usual suspects look like in the tree:

The Flat view lists the slowest 250 methods. Set it to Self Time to see the exact methods that burn the most time on their own.

If the method names look scrambled (class_3218, m_8793_), pick the right mappings from the dropdown in the top right; the viewer usually detects them on its own.

Spikes, memory and the rest of spark

Fix guides that start from a spark report

The same spark-first approach, with the fixes worked out for specific packs:

If spark says memory really is the limit, the RAM calculator suggests a size by pack and player count.

Run your server on Packyard

Packyard charges $1.50 per GB of RAM per month (USD plus applicable taxes), from $5 for 3 GB. Paper servers on 1.21 or newer come with spark built in, and on modded servers you can add it through the panel's file manager or SFTP. You get a permanent address, daily backups plus backups you make yourself, and sub-users for friends who help you run it. The order page shows which sizes are in stock right now. Available in the US and Canada (not Quebec).

Start a Paper server from $5/month, or see Minecraft server hosting on Packyard.

spark is made by lucko and contributors. Packyard is not affiliated with spark, PaperMC, Mojang or Microsoft.

FAQ

Is spark already installed on my server?

On Paper 1.21 and newer, yes: it's bundled. On Fabric, Forge and NeoForge, only if your modpack includes it. Type /spark and see if the command exists.

How long should I run the spark profiler?

3 to 10 minutes while the lag is happening. /spark profiler start --timeout 300 stops by itself after 5 minutes and posts the link.

How do I find which mod is causing lag?

Open the profiler link, select Server thread, and switch to the Sources view. It splits the tick time by mod or plugin, with the most expensive at the top.

What is a good TPS and MSPT?

20 TPS is the maximum and what you want. MSPT (milliseconds per tick) should stay under 50; above that, the server can't keep 20 TPS.

Does spark cause lag itself?

Hardly. It samples the server every few milliseconds rather than timing every call, which is why Paper replaced its old Timings profiler with it.

Do players need spark installed?

No. The server copy is all you need. There's a separate client version (/sparkc) for checking a player's own FPS.

More guides and posts on the Packyard blog.