Serverwave
Game :: Minecraft Java · 4 min read

How to Use Spark Profiler to Diagnose Minecraft Server Lag & Performance

Learn how to set up and use Spark to profile your Minecraft server. Discover lag sources, memory leaks, TPS drops, and optimize performance with detailed reports.

---

What Is Spark? Spark is a performance profiling plugin/mod for Minecraft servers (Forge, Fabric, or Bukkit/Spigot-based) that helps you diagnose lag, memory issues, TPS drops, and other bottlenecks.

Key features: Real-time TPS / MSPT / CPU / memory monitoring Profiling of server threads, method calls, and memory allocations Heap dumps / memory summaries / GC info Web-based viewer that presents the profiling data in a readable format Spark is widely used by hosting providers to assist users with performance diagnostics. ---

Installation of Spark The installation process depends on your server type (modded / plugin). Here’s how it’s typically done: | Server Type | Steps to Install | | ---- | | Spigot / Paper / Bukkit (plugin) | Download the Spark plugin JAR (from SpigotMC or official Spark) and place it in the plugins/ folder. | | Forge / Fabric (modded) | Download the Spark mod JAR version matching your Minecraft and mod loader version. Upload it to the mods/ folder. | After placing the JAR, restart your server fully to activate Spark. ---

Basic Spark Commands & Usage Once Spark is installed, you can use specific commands to profile and inspect server performance.

Profiling Workflow & Best Practices When to profile -&#32;Run Spark while the lag or performance issue is happening (or soon after) so that Spark can record the relevant activity. Duration For general profiling, 30–60 seconds is enough to gather meaningful data. If lag is sporadic, use flags like --only-ticks-over <ms> to only record slow ticks. Stopping & retrieving report -&#32;After stopping the profiler, you’ll receive a URL (via console or chat). Open that in your browser to view the profiling report. Reading the report The report shows threads, call frames, execution times, and percentages. Expand the “Server thread” section to see which operations (e.g. tick, plugins, entity updates) are consuming time. Hover over nodes to see ms values; percentages show relative cost. Use the flame graph or “flat view” to isolate performance hot spots. * Share with support or devs You can share the generated report URL for help diagnosing issues. ---

Common Use Cases & Examples Consistent TPS drop → run /spark profiler start --timeout 30/spark profiler stop → inspect which tasks are dominating time Lag spikes / occasional stutters → use /spark profiler start --only-ticks-over 70 --timeout 60 (or adjust threshold) Memory leaks or GC issues → use /spark heapsummary or /spark gc and review memory usage breakdowns Server health checks/spark healthreport for an overview of system state ---

Related articles

How to upgrade your Minecraft server to 1.21.11

Learn how to update your Minecraft server to version 1.21.11 on Serverwave with this stepbystep guide. Works…

How to Install a Custom Server Jar on Your Minecraft Server

Want to run a custom version of Minecraft, a modded jar, or your own server build? Serverwave makes it easy t…

How to Install Forge on Your Minecraft Server

Learn how to install Minecraft Forge on your Serverwave server. Stepbystep guide to set up Forge, upload mods…