Running /spark profiler start while your server is lagging is the easy part — the hard part is reading the resulting spark.lucko.me report and working out which plugin, which method or which setting is responsible. In this guide we walk through how to run a spark analysis from scratch, how to interpret the TPS/MSPT graph and what to look for when reading the report, step by step.

Related reading: Minecraft server optimization · Minecraft server setup · Spark analysis tool

What Is the Spark Profiler?

Spark is an open source performance profiler developed by Lucko, and it runs on virtually every Minecraft server software — Paper, Spigot, Folia, Forge, Fabric. It samples and records your server's tick loop, every method call, garbage collection (GC) pauses and per-plugin CPU usage, then publishes the result as a shareable link on spark.lucko.me.

The problem is this: when you open that link you are met with hundreds of method names, percentage values and tabs. Without knowing which line actually matters, the report is just a crowded pile of data.

How to Start the Spark Profiler

Before you can analyse anything you need to collect data. Run the following commands in order, from the console or in-game with a staff account:

Start the profiling session

/spark profiler start --timeout 300

Let the server keep running normally and wait at least 2-5 minutes. If you want to catch the lag as it happens, wait long enough to cover the window in which the problem occurs — if you only sample a quiet moment, the report will not tell you anything meaningful.

Stop the profiling session and generate the report

/spark profiler stop

The command finishes by returning a https://spark.lucko.me/abc123 link. You can open this link in a browser, or paste it straight into KEYDAL's Spark analysis tool to get an automatic interpretation.

Reading the Spark Report on spark.lucko.me

The Sampler (CPU) Tab

When the report opens you are shown a flame graph. Each row represents a method call; the width shows that method's share of total CPU time. Wide blocks sitting near the top are the code paths consuming the most time. Click a block to expand its child calls and see which plugin triggered which operation.

The TPS and MSPT Graph

The TPS (ticks per second) and MSPT (milliseconds per tick) values in the top right summarise the overall health of the server. On a healthy server TPS should sit close to 20.0 and MSPT below 50ms — because a tick taking longer than 50ms means the server cannot keep up with 20 ticks per second.

TPS / MSPT RangeStatus
20.0 TPS / <35ms MSPTExcellent — the server has headroom
18-20 TPS / 35-50ms MSPTNormal — under light load, no action needed
15-18 TPS / 50-65ms MSPTWarning — players start to notice slight delay
<15 TPS / >65ms MSPTCritical — visible lag, immediate action required

Sources: CPU Usage per Plugin

This is spark's most practical tab: it groups total CPU time by plugin. If you see a plugin with an unexpectedly high percentage (for example a small decorative add-on eating 20% CPU), you have found your source of lag.

Which Findings Point to Lag?

  • One plugin's CPU share is disproportionately high — it may be misconfigured or running inefficient code
  • Frequent and long GC pauses — the heap is too small or there is a memory leak
  • Chunk loading/generation methods near the top — world pre-generation is missing or players keep exploring new terrain
  • High entity/tile-entity tick methods — excessive mob/redstone/hopper density
  • Native I/O or database calls near the top — the disk is slow or synchronous queries are being used

Health Report and GC Analysis

Beyond the sampler, the /spark health command produces a "health report" showing live CPU, RAM, disk and GC statistics. GC pause duration matters most here: on a server properly tuned with G1GC, GC pauses rarely exceed 50ms. If you regularly see 100ms+ pauses, review your JVM flags (heap size, GC algorithm).

Automatic Interpretation with the KEYDAL Spark Analysis Tool

Reading a flame graph takes experience. KEYDAL's Spark analysis tool automates the process so that pasting your spark.lucko.me link is all you need to do: it extracts the TPS/MSPT distribution, ranks the methods and plugins consuming the most CPU, reads the GC pauses, audits your JVM/system settings and produces a health score. Optionally you can have the anonymised metrics interpreted by AI to get concrete recommendations — personal data such as player names, IPs and server names is stripped automatically before that step.

Common Mistakes in Spark Analysis

  • Sampling for too short a time — a 10-15 second profile will not catch the moment of lag; sample for at least a few minutes
  • Profiling during a quiet period — if you do not profile at the time or in the situation where lag occurs, the report comes out clean but shows nothing
  • Looking only at the sampler and skipping the Sources tab — the per-plugin breakdown usually gives you a faster diagnosis
  • Watching TPS and ignoring MSPT — even when TPS reads 20.0, rising MSPT means the server is approaching its limit

Frequently Asked Questions

Does the spark profiler slow the server down?

Spark's sampling approach has very low overhead; in normal use it does not noticeably affect server performance. That is why it can safely be run even on a live server full of players.

How long are spark reports kept?

Reports on spark.lucko.me are deleted automatically after a limited period (usually a few weeks). If you want to keep an important analysis for reference, take a screenshot or write down your findings.

TPS is 20 but players still experience lag — why?

TPS measures tick rate on the server side; delay on the player side can come from entirely different factors such as the network (ping), client FPS or render distance. Spark shows you the server side — for network-related delay, check /ping and your server location.

Will spark tell me which plugin to disable?

Spark will not say "disable this plugin" outright, but the CPU percentages in the Sources tab show you where to start. Reviewing the settings of the plugin with the biggest share, or checking whether it is on its latest version, is usually the first step.