/> />

How to Install and Use Spark

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.


Installing Spark

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.

Step 1:

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

Downloading Spark from CurseForge.Downloading Spark from SpigotMC.
Step 2:

Access your control panel and Shut Down your server.

stopping a paper Minecraft server
Step 3:

Access your server's control panel and navigate to the Files tab.

Open your Shockbyte panel and click the files tab
Step 4:

Navigate to the mods or plugins directory.

Note

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.

Opening the plugins folder.Opening the mods folder.
Step 5:

Upload the Spark.jar file.

Uploading Spark to a Minecraft server.
Step 6:

Start your server.


Generating and Accessing a Profiler Report

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.

Step 1:

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.

Step 2:

Allow your server to run for 10 minutes or more, then use the /Spark Profiler --Stop command.

Step 3:

Click the link provided after your Spark report generates.

Opening a Spark report.

Analysing the Profiler

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.

Step 1:

Click the Call thread called Server thread to expand the menu

Expanding a Spark report.
Step 2:

Click the next Call thread which had taken the most percentage of time to complete to continue expanding the tree

Opening a call thread in a Spark report.
Step 3:

Continue this process until you have found a Call thread which gives you enough information to continue troubleshooting

Troubleshooting a Minecraft server using Spark.
Step 4:

In this example, we can determine that our server lag is caused by an excessive amount of entities.

Finding that entity lag is an issue on a Spark report.

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.


Zach's Avatar
Zach Lowery

Game Experience Engineer