← Back to Knowledgebase

Using Spark Profiler

An advanced guide to diagnosing server lag (TPS drops) using the Spark profiler.


What is Spark?

Spark is a performance profiling plugin/mod that records exactly what your server's CPU is doing. It helps identify which plugin, entity, or mod is causing lag.

Installation

If you are using Paper or Purpur, Spark often comes pre-installed or can be easily added.

  1. Download Spark.
  2. Upload the .jar to your /plugins/ (for Paper/Spigot) or /mods/ (for Fabric/Forge) folder.
  3. Restart the server.

Running a Profiler

When your server starts lagging (low TPS), run the following command in-game or in the console:

spark sampler --timeout 120

This will record data for 120 seconds.

Analyzing the Results

Once the profiler finishes, it will generate a link (e.g., https://spark.lucko.me/abc12345). Click this link to open the viewer.

Key things to look for:

Common Fixes