Mods & Plugins
·
Sep 23, 2024
Spark is a performance profiling plugin/mod which provides you with a variety of tools which help when diagnosing performance and memory issues.
While Spark is simple to install it has a lot of options, commands, and information that can feel a bit overwhelming to users. If you need help at any time, please don't hesitate to contact our 24/7 support team or check out the Spark documentation available here.
To install Spark, you will need to download its jar file, then upload it to either your mods or plugin folder - as Spark is compatible with both Spigot/Paper servers and Forge/Fabric servers.
Download Spark from CurseForge or SpigotMC.
There are two versions of Spark available. Depending on your server type, you will either want to use the CurseForge version or the SpigotMC version.
If you are running a server type such as Spigot or Paper, you will want to download the SpigotMC version: https://www.spigotmc.org/resources/spark.57242/
If you are running a server type such as Forge or Fabric, you will want to download the CurseForge version: https://www.curseforge.com/minecraft/mc-mods/spark
Access your control panel and Shut Down your server.
Access your server's control panel and navigate to the Files tab.
Navigate to the mods or plugins directory.
If you downloaded Spark from SpigotMC, you will want to navigate into the plugins folder. If you downloaded Spark from CurseForge, you will want to navigate into the mods folder.
Upload the Spark.jar file.
Start your server.
Although there are a variety of utility commands provided by Spark, we will only cover the CPU profiler tool. We highly recommend you refer to the Spark documentation if you'd like to learn more detail about the CPU profiler tool or the other tools Spark provides.
Running the Spark profiler will generate a link that will direct you to your server's Spark report. This link can be sent to Shockbyte Support to help our staff diagnose the cause of lag, however, it can be insightful to more advanced users as well.
Connect to your server and ensure you have OP.
You will need OP in order to run commands related to Spark, which you can give yourself by running op <your username>
in your server's console.
Allow your server to run for 10 minutes or more, then use the /Spark Profiler --Stop command.
Click the link provided after your Spark report generates.
After opening your profiler report, you can click the Server thread dropdown menu to expand the server's threads. According to the Spark Documentation, "Threads (at the top of the profile) will always show 100% next to them; this is because 100% of the time spent profiling the thread was, well, spent within that thread."
Call threads (or each item in the dropdown menu) may be a little confusing, especially if you're new to Java programming or Minecraft server internals. You can find a list of notable call frames to be aware of on the Spark Documentation here.
Click the Call thread called Server thread to expand the menu
Click the next Call thread which had taken the most percentage of time to complete to continue expanding the tree
Continue this process until you have found a Call thread which gives you enough information to continue troubleshooting
In this example, we can determine that our server lag is caused by an excessive amount of entities.
Now we can focus on troubleshooting entity lag thanks to Spark.
To learn more about Spark and how to read a report, we highly recommend reading the Spark Using the Viewer documentation.
Game Experience Engineer