MINECRAFTHUB.IO
Mods

spark

spark is a performance profiler for Minecraft clients, servers, and proxies. It samples CPU usage and thread timings, then generates shareable flame graph reports that pinpoint the exact cause of lag spikes and TPS drops.

By lucko via Modrinth.

spark performance profiler banner showing the project name on a dark gradient background
Section
Java Mod
Platform
Java
Versions
v 1.16.5 / 1.17.1 / 1.18.2 / 1.19.2 / 1.20.1 / 1.20.4 / 1.21.1 / 1.21.5 / 1.21.11
Last checked
Updated

spark is a performance profiler for Minecraft Java clients, servers, and proxies, written by lucko. Rather than guessing where lag comes from, spark samples the active thread stack at regular intervals and records which methods consume the most CPU time. When you are ready, one command generates a shareable flame graph at spark.lucko.me that makes the slowest code paths immediately visible. It supports Fabric, Forge, NeoForge, and Quilt across Minecraft versions from 1.16.5 through 1.21.x, and it runs client-side, server-side, or on both simultaneously.

How spark works

spark uses async stack sampling: every few milliseconds it captures a snapshot of each active thread without blocking the game loop. After a configurable session window, those snapshots are aggregated into a flame graph that shows the full call tree ranked by how often each method appeared. Wider bars cost more CPU time. Because sampling is asynchronous, spark profiles a live server under real player load without adding extra lag during the session itself.

spark also provides /tps and /ping commands that report server tick rate and player network latency from the console or in-game. These are lightweight quick-checks that do not require a full profiling session.

How to install spark

  1. 1.Download the spark JAR for your loader from modrinth.com/mod/spark. Pick Fabric, Forge, NeoForge, or Quilt based on your setup.
  2. 2.Drop the JAR into your mods folder on the client or server.
  3. 3.Launch the game or restart the server. No additional library mods are required.
  4. 4.Run /spark profiler start in-game or in the server console to begin a sampling session.
  5. 5.After 30 to 60 seconds under the load you want to diagnose, run /spark profiler stop. spark prints a report URL.

Reading a spark report

After stopping a session, spark uploads the result and prints a short URL like spark.lucko.me/abc123. Open it in any browser to see the flame graph. The horizontal axis shows cumulative CPU time: wider bars cost more. Click a bar to drill into the method call tree. Hover to see the exact percentage of total sampling time. Sort by self time to isolate leaf methods that are slow on their own rather than because they call expensive children.

Common findings include world generation methods during chunk loading, entity AI ticking in large mob farms, and mod or plugin hooks that fire on every game tick. Each finding links back to a class and method name you can search or report upstream to the relevant project.

  • Loaders: Fabric, Forge, NeoForge, Quilt
  • Side: client-side, server-side, or both
  • Minecraft versions: 1.16.5 through 1.21.x
  • Dependencies: none required for mod builds
  • License: GPL-3.0-only

Questions about this entry.

  • How do I install spark?

    Download the spark JAR for your loader from modrinth.com/mod/spark and drop it in your mods folder. On clients, launch the game. On servers, restart the process. No additional library mods are required for Fabric, Forge, NeoForge, or Quilt installs.

  • Does spark work on multiplayer servers?

    Yes. spark runs on both the client and the server independently. Install it as a mod on a Fabric or Forge server and profile without any client-side install. Server owners get the /spark command in the console and in-game with the appropriate permission.

  • How do I read a spark report?

    Run /spark profiler start in-game or in the server console, let the session run for 30 to 60 seconds under the load you want to diagnose, then run /spark profiler stop. spark uploads the result and prints a URL pointing to spark.lucko.me where you can browse the flame graph sorted by CPU cost.

  • Which Minecraft versions does spark support?

    spark supports Minecraft Java Edition from 1.16.5 through 1.21.x on Fabric, Forge, NeoForge, and Quilt. Server-side plugin builds covering Paper, Spigot, Sponge, Bungeecord, and Velocity are available from the creator's site at spark.lucko.me.

  • Is spark safe to run on a live production server?

    Yes. spark uses asynchronous sampling that does not pause server threads. A profiling session adds a small CPU overhead while it runs. Once you stop the session and generate the report, the overhead stops entirely.