---
title: "Spark profiler Minecraft: read the profile, find the lag"
description: "How to install spark, take a profile at the right moment and read the call tree to find which plugin, entity or task is blowing up your server's MSPT."
url: "https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft"
type: "page"
language: "en-US"
---

Minecraft · 7 min · Intermediate

Published on Aug 26, 2026 · Updated on Aug 26, 2026

# Spark profiler: finding the real cause of lag

A TPS of 20 and a stuttering server are not contradictory. Spark measures how much each tick really costs and shows, line by line, where that time is going.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Performance and optimization](https://streethosting.com.br/en/guides/topics/performance) [Minecraft plugins](https://streethosting.com.br/en/guides/topics/plugins)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=Spark%20profiler%3A%20how%20to%20analyze%20Minecraft%20server%20lag&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft "Share on LinkedIn") [](https://wa.me/?text=Spark%20profiler%3A%20how%20to%20analyze%20Minecraft%20server%20lag%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fminecraft%2Fspark-profiler-minecraft "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft.md)

In this guide 7 sections

* [TPS and MSPT: which number to watch](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#tps-vs-mspt)
* [Installing spark](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#instalar)
* [The commands that matter](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#comandos)
* [When and for how long to profile](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#quando-perfilar)
* [How to read the call tree](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#ler-arvore)
* [The classic lag patterns](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padroes)
* [Configuration or hardware limit](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#config-ou-maquina)

Quick answer

**Spark** is the standard profiler for Paper, Purpur, Fabric and Forge servers. Install the jar, run `/spark profiler start` during the real peak, stop it with `/spark profiler stop` and always follow the branch with the highest percentage in the tree until you reach a package that is not from Minecraft. To skip the raw reading, paste the profile link into [tickdoc](https://tickdoc.streethosting.com.br/?utm%5Fsource=streethosting&utm%5Fmedium=site&utm%5Fcampaign=tools&utm%5Fcontent=guia%3Aspark-profiler-analisar-lag-minecraft), which returns the culprit and the fixes ordered by impact.

## TPS and MSPT: which number to watch[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#tps-vs-mspt)

The Minecraft server processes the world in ticks, twenty per second. Each tick has a budget of fifty milliseconds to do everything: move mobs, calculate redstone, grow crops, run plugins, save chunks. If the work fits in that budget, the tick finishes and the server waits for the next one. If it doesn't, the tick runs late and TPS drops.

| Average MSPT | Resulting TPS | How players feel it                     |
| ------------ | ------------- | --------------------------------------- |
| Up to 25 ms  | 20            | Nothing. Comfortable headroom           |
| 25 to 40 ms  | 20            | Still smooth, but no margin for a spike |
| 40 to 50 ms  | 20            | Occasional stutters at peaks            |
| 50 to 70 ms  | 16 to 19      | Mobs freezing, blocks slow to break     |
| Above 100 ms | Below 10      | Server practically unplayable           |

Notice what the table shows: between 25 and 50 milliseconds TPS reads twenty the whole time, and yet the server went from comfortable to almost overflowing. That is why MSPT is the honest number. TPS only tells the story after the damage is done.

Look at the maximum MSPT too, not just the average. A single 400 ms tick in the middle of a quiet minute disappears into the average but is exactly the freeze the player complained about on Discord. For the basic explanation of the concept, see [what TPS is and how to improve it](https://streethosting.com.br/en/guides/minecraft/what-is-tps-minecraft).

## Installing spark[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#instalar)

Spark has a build for each platform, and installing it works like any other plugin or mod.

1. Download the build for your platform: Bukkit and derivatives for Paper, Spigot and Purpur, or the Fabric or Forge build if it is a modded server.
2. Put the jar in `plugins/` or in `mods/`, as appropriate.
3. Restart the server and confirm in the boot log that it loaded.
4. Make sure your account has the plugin's permission, otherwise the commands won't respond.

Many modern Paper builds and several modpacks already ship with spark included. Run `/spark` before installing: if it responds, you are all set.

## The commands that matter[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#comandos)

| Command                             | What it does                                  | When to use it                                                |
| ----------------------------------- | --------------------------------------------- | ------------------------------------------------------------- |
| /spark tps                          | Shows TPS and MSPT over several time windows  | Always the first command. Confirms whether there is a problem |
| /spark health                       | Memory, garbage collector, CPU and disk       | When you suspect hardware or heap, not a plugin               |
| /spark profiler start               | Starts recording thread samples               | While the lag is happening, at peak time                      |
| /spark profiler stop                | Stops and returns the result link             | After three to five minutes of recording                      |
| /spark profiler start --timeout 300 | Records for a fixed time and stops on its own | When you won't be online to stop it                           |
| /spark profiler start --thread \*   | Profiles all threads, not just the main one   | Investigating async tasks or disk I/O                         |

Always start with `/spark tps` and `/spark health`. If MSPT is comfortable and memory is healthy, the lag players report may come from the network and not from the server, and no profile will show that.

## When and for how long to profile[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#quando-perfilar)

This is the part most people get wrong. A profile taken with an empty server at three in the morning only proves that an empty server has no lag.

* **Profile under real load.** With the players who are usually online at the worst time, doing what they usually do.
* **Three to five minutes.** Below that, sampling captures noise. Well above it, the spike you want to investigate gets diluted into a long average and vanishes.
* **Start a little before the event.** If the lag shows up when the shop opens, when someone turns on the mob farm or when the world saves, start the profiler a few seconds beforehand.
* **One profile per hypothesis.** Keep the link to each recording. Comparing before and after a fix is worth more than any theory.

Don't draw conclusions from a profile shorter than one minute. Spark works by sampling: little time means few samples, and few samples produce percentages that change on every attempt.

## How to read the call tree[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#ler-arvore)

The spark result is a tree. The threads sit at the top, and inside each one are the calls that used up time, each with a percentage. The reading rule is simple and always the same.

1. Open the server's main thread. It is the one that defines MSPT, and therefore TPS.
2. Ignore the small percentages. Start with the fattest branch, the one that alone takes a big share of the total.
3. Expand that branch and repeat: inside it, follow the child with the highest percentage again.
4. Keep going down until the package name stops being `net.minecraft` or `org.bukkit`. The first third-party package that appears is the real consumer.
5. If the branch ends entirely inside the game's own code, the consumption comes from the world itself: entities, chunks, redstone. Then the fix is in configuration or content, not in a plugin.

[tickdoc](https://tickdoc.streethosting.com.br/?utm%5Fsource=streethosting&utm%5Fmedium=site&utm%5Fcampaign=tools&utm%5Fcontent=guia%3Aspark-profiler-analisar-lag-minecraft) walks that path for you: you paste the profile link and it points out which plugin, mod or task is weighing the server down, separates what is a configuration tweak from what is a hardware limit, and orders the fixes by impact. It lives on the [free tools](https://streethosting.com.br/en/ferramentas) page along with the other diagnostic utilities.

## The classic lag patterns[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padroes)

After reading a few profiles, you start to recognize the shapes. These five cover almost everything that shows up on an ordinary server.

### Too many entities[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padrao-entidades)

Branches tied to entity ticking and to searches for nearby entities dominate the percentage. It is usually a mob farm, animals piled up in a player's farm, items on the ground nobody picked up, or storage with hundreds of hoppers. The fix is to limit mob density, tune the build's entity stacking and hunt down the guilty construction by its coordinates.

### Chunk generation[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padrao-chunk)

Terrain generation and loading branches weigh heavily. It happens when someone is exploring new terrain by elytra, or when a dynamic world plugin generates area all the time. If the world has a defined border, generating the terrain beforehand with a pregeneration tool takes that cost out of peak time.

### Plugin in a synchronous tick[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padrao-plugin)

A plugin package showing up high on the main thread. It is almost always a task that should be asynchronous: a database query, a call to an external API, reading a large file. The tick stands still waiting for the answer. Without access to the code, the way out is to update the plugin, adjust the task frequency in its configuration or replace it with an alternative.

### Garbage collector[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padrao-gc)

In `/spark health` you see long, frequent collection pauses. Here the enemy is not a specific plugin, it is the JVM giving memory back clumsily. The [Aikar Flags](https://streethosting.com.br/en/guides/minecraft/aikar-flags-minecraft) exist exactly for this, breaking one big pause into several short ones.

### Disk I/O[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padrao-io)

Write calls and region saving eat up ticks, often concentrated at regular intervals. It is the world autosave on a slow disk, or a backup running on the same volume during play hours. Moving the backup outside of peak time solves a large share of cases.

* Profile taken under real load, not with an empty server
* At least three minutes of recording
* Highest-percentage branch followed down to the third-party package
* One fix applied at a time
* New profile at the same time of day to compare

## Configuration or hardware limit[](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#config-ou-maquina)

The question the profile answers better than anything else is whether it is worth continuing to tune or whether it is time to change hardware. The criterion is the shape of the tree.

| What the profile shows                     | Diagnosis                          | What to do                           |
| ------------------------------------------ | ---------------------------------- | ------------------------------------ |
| One branch taking a big slice of the total | A specific, fixable problem        | Go after that plugin, entity or task |
| Time spread evenly, no dominant branch     | The machine is at its limit        | Reduce the load or move up a plan    |
| Frequent memory collection pauses          | Poorly tuned JVM or a small heap   | Aikar Flags and a memory review      |
| Spikes at fixed times                      | Scheduled task, backup or autosave | Move the task out of peak time       |

When the conclusion is capacity, remember that Minecraft depends almost entirely on a single thread. More cores don't help as much as faster cores, which is why a [Ryzen VPS](https://streethosting.com.br/en/vps/ryzen) with a high clock speed does better on MSPT than a machine with twice the cores and a low clock. If you would rather not manage a server, the [Minecraft Pro](https://streethosting.com.br/en/minecraft-pro) plans already deliver this kind of hardware ready to go.

And before any change, go through the list of tweaks that usually give MSPT back at no cost, collected in [how to reduce lag on a Paper server](https://streethosting.com.br/en/guides/minecraft/reduce-lag-paper-server).

In this guide

* [TPS and MSPT: which number to watch](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#tps-vs-mspt)
* [Installing spark](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#instalar)
* [The commands that matter](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#comandos)
* [When and for how long to profile](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#quando-perfilar)
* [How to read the call tree](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#ler-arvore)
* [The classic lag patterns](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#padroes)
* [Configuration or hardware limit](https://streethosting.com.br/en/guides/minecraft/spark-profiler-minecraft#config-ou-maquina)

## Frequently asked questions

What is the difference between TPS and MSPT?

TPS counts how many ticks the server ran per second, capped at 20. MSPT measures how long each tick took. Since the budget for one tick is 50 ms, TPS only drops once MSPT goes above 50. A server at 45 ms of MSPT shows TPS 20 and is already at its limit.

My TPS is 20 but the server stutters. Why?

Because the average hides the spikes. TPS is an average over several seconds, and a single 400 ms tick disappears into that average while the player feels the freeze. Look at the maximum MSPT, not just the average, and take a profile while the stutter is happening.

How long should I leave the profiler running?

Three to five minutes, with the server under real load. Less than that captures noise, and much more dilutes the spike into a long average. If the lag happens at specific moments, start recording a little before the moment.

Does spark slow the server down?

The cost is low and acceptable during an investigation, because spark samples the threads instead of instrumenting every call. Still, stop the profiler after you have collected what you need instead of leaving it running all day.

The profile doesn't point to any plugin. Now what?

When the time is spread evenly across parts of the game itself, with no dominant branch, the problem is not configuration but capacity. This shows up on servers with a lot of players, a lot of entities or a heavy modpack on a CPU without enough clock speed.

Does spark replace timings?

Yes. Timings was discontinued in modern Paper builds and spark is the recommended successor. It shows more, includes the threads other than the main one, and measures memory and the garbage collector in the same report.

Next step

See Minecraft Pro

Managed hosting on Ryzen with modpacks, optimized Paper and technical support.

[See Minecraft Pro](https://streethosting.com.br/en/minecraft-pro)

[See Ryzen VPS Ryzen 9 9950X VPS in São Paulo with root access, NVMe and gamer Anti-DDoS.](https://streethosting.com.br/en/vps/ryzen) [Minecraft plans Compare Minecraft hosting options in Brazil.](https://streethosting.com.br/en/minecraft)

## Related guides

[Minecraft Intermediate How to reduce lag on a Minecraft Paper server (TPS and mspt) Lag is not 'the host's fault' until you measure it: high mspt comes from the world, the configuration and the code running in the tick. This guide puts diagnosis ahead of aggressive tuning. 6 min Read guide](https://streethosting.com.br/en/guides/minecraft/reduce-lag-paper-server) [Minecraft Intermediate What is TPS in Minecraft and how to improve it (complete guide) TPS is the server's clock: 20 means a smooth world, anything below that and everything lags behind. MSPT shows how many milliseconds each tick costs. Measuring before tuning tells a plugin problem apart from the wrong host. 6 min Read guide](https://streethosting.com.br/en/guides/minecraft/what-is-tps-minecraft) [Minecraft Advanced Aikar flags: optimize the JVM on your Minecraft server Periodic stutters are usually a badly tuned garbage collector. Aikar Flags configure G1GC to reclaim memory in small pauses, smoothing out TPS at peak hours. 3 min Read guide](https://streethosting.com.br/en/guides/minecraft/aikar-flags-minecraft)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
