In short
If your Minecraft TPS is low, start with /spark tps and check MSPT: any value above 50 ms per tick pulls TPS below 20. Then run /spark profiler start --timeout 300 while players are online, follow the highest-percentage branch under Server thread in the report, and find the culprit plugin, or the crowded chunk with /paper entity list.
In this guide
When your Minecraft server's TPS drops, the cause is almost always something specific: a plugin, an overcrowded chunk, a runaway redstone contraption, or long Java garbage collector (GC) pauses. Instead of guessing, record a few minutes with the spark profiler and read the report. You can often find the culprit in a single session. This guide walks you through every step, from installation to reading the report to fixing the problem.
What are TPS and MSPT?
TPS (Ticks Per Second) shows how many game loops (ticks) the server processes each second. Minecraft targets 20 TPS, which gives each tick a time budget of 50 milliseconds.
MSPT (Milliseconds Per Tick) is how long a tick actually takes. This is the number that matters most for diagnosis:
- If MSPT is under 50 ms, TPS stays at 20. The gap is your safety margin.
- As soon as MSPT goes over 50 ms, TPS starts to drop. Players see broken blocks reappear and mobs teleport.
- If TPS shows 20 but MSPT is around 45 ms, the server is at its limit. A few more players will trigger lag.
That is why looking at TPS alone is misleading. A server at 20 TPS with 48 ms MSPT is in a very different state than one running at 12 ms.
What is spark, and why use it?
spark is an open-source performance profiler. It uses sampling to measure how much time the server thread spends in each method, then turns the results into an interactive report that opens in your browser. Its overhead is low, so you can safely run it on a live server with players online.
Paper has dropped the old timings system and now ships spark as its built-in profiler. On current Paper and forks like Purpur, you may not need to install it separately. If the command doesn't respond, installing it as a plugin takes only a few minutes.
Installing spark
- Type
/sparkin the server console or in game. If the command responds, spark is already built in and you can skip this section. - If there is no response, download the file for your platform (Bukkit/Paper, Fabric, Forge or Velocity) from spark's official download page.
- Upload the file to the
plugins/folder on Bukkit-based servers, or themods/folder on Fabric and Forge. - Fully restart the server. Don't use
/reload; it can break plugin state and skew your measurements. - Grant the
sparkpermission only to your staff group so that only admins can run profiler commands.
Quick health check
Before you start the profiler, get the big picture with three commands:
/spark tps
/spark health
/spark gc
/spark tps shows TPS averages over short and long time windows plus tick durations (minimum, median, 95th percentile and maximum MSPT). Reading it is simple:
- Low median, high maximum: The problem isn't constant load but intermittent stutters (lag spikes). Usually a scheduled task, an autosave or a GC pause.
- High median: The server is struggling every tick. Think crowded entities, heavy plugins or not enough resources.
/spark health gives a summary of CPU usage, memory and disk. /spark gc lists how often and for how long the garbage collector ran; long GC pauses point to a RAM or JVM settings problem.
How to record a profiler session
The real diagnosis happens in the profiler. Record while the problem is happening and players are online; a report from an empty server won't tell you anything.
# 5-minute recording for constantly low TPS
/spark profiler start --timeout 300
# For intermittent stutters: record only ticks over 100 ms
/spark profiler start --only-ticks-over 100
# If you didn't set a duration, stop manually and upload the report
/spark profiler stop
When the recording ends, spark posts a link in chat and in the console. The link opens in spark's web viewer. You can share the report with your team or the support team using that same link; there's no need to send any files.
How to read a spark report
1. Focus on the Server thread
The report is a tree, with threads listed at the top. The thread that runs the game logic is the Server thread. Network and async task threads usually don't lower TPS directly, so look at the main thread first.
2. Follow the percentages down
The percentage next to each line is that method's share of the recording time. Expand the branch with the highest percentage and keep going. Method names vary by version, but the tree roughly breaks down into these sections:
- World tick: entities, block entities (hoppers, furnaces, chests), chunk loading and generation.
- Network and connection handling: processing packets from players.
- Plugin schedulers: tasks that plugins run every tick or at set intervals.
3. Use the per-plugin view
The sources view in the viewer adds up time spent per plugin. If one plugin takes a noticeable share of the total time, it's your first suspect. The flat view lists the individual methods that use the most time, which helps when you get lost in a deep tree.
4. Keep context in mind
A high percentage alone isn't proof of guilt. It's normal for the world tick to take the largest share. What matters is whether MSPT goes over 50 ms and whether something unexpected takes up a large share during that time.
Common culprits and how they show up in the report
| Sign in the report | Likely cause | First fix |
|---|---|---|
| Very high entity tick share | Hundreds of mobs in farms, items piling up on the ground, villager halls | Find the busy chunk and set mob and farm limits |
| Hopper and block entity ticks | Long hopper chains, automatic sorters | Review your farm rules and Paper's hopper settings |
| Chunk generation | Players constantly exploring new terrain | Set a world border and pre-generate the map |
| A single plugin name stands out | Database queries or heavy tasks running on the main thread | Update the plugin, change its settings or find an alternative |
/spark gc shows long pauses | Not enough RAM or poor JVM flags | Fix your JVM flags and add RAM if needed |
| Redstone and block updates | Always-on clock circuits, lag machines | A redstone limiting rule or plugin |
Finding the laggy chunk
spark answers the question "which code?" For "where in the world?", use Paper's own commands:
# Counts loaded entities by type
/paper entity list
# Shows the chunks with the most entities of a given type
/paper entity list minecraft:item
/paper entity list minecraft:villager
# Gives a summary of loaded chunks and entities
/paper chunkinfo
If you see hundreds of items, villagers or animals in a single chunk, teleport there and check it in person. Telling the owner and shrinking the farm is often a more lasting fix than adding another plugin.
Step-by-step diagnosis workflow
- Use
/spark tpsto tell whether the problem is constant or sudden stutters. - If it's constant, record a normal 5-minute profiler session; for sudden stutters, record with
--only-ticks-over 100. - Follow the highest-percentage branch under Server thread: is it a plugin or the world?
- If it's a plugin, update it or change its settings; if it's the world, find the location with
/paper entity list. - Check GC pauses with
/spark gc. If you see long pauses, follow the JVM settings with Aikar's flags guide. - After every change, take a new report and compare MSPT. Change one thing at a time; otherwise you won't know what worked.
If chunk generation stands out in the report, see the pre-generating your world with Chunky guide. For a general checklist, read our 12 checks for fixing lag article.
When the problem is resources, not code
If the report shows no clear culprit, the load is spread across the world tick, and MSPT climbs steadily as player count grows, your server has most likely hit its resource limit. Minecraft's main game loop runs on a single thread, but Paper offloads work such as chunk loading, lighting, networking and GC to additional cores. Not enough RAM shows up as frequent, long GC pauses.
This pattern is common on busy survival servers with lots of plugins. The OB-MC-5 Minecraft server plan, with 6 CPUs and 16 GB of RAM, gives a plugin-heavy, busy survival server comfortable headroom. For communities with big maps, multiple worlds or a heavy farming culture, the OB-MC-6 plan with 8 CPUs and 24 GB of RAM leaves more room for GC and extra threads.
Next steps
Take a report first and fix any software bottlenecks; on most servers that's a free performance gain. If MSPT still hovers near 50 ms after that, consider upgrading resources. You can compare all plans on the Minecraft server plans page. OyunBulut plans run in our Istanbul data center and come with DDoS protection and a web panel. Attach your spark report link to a support ticket and our support team can review it with you.
Frequently asked questions
What is a normal TPS in Minecraft?
20 TPS is both the target and the maximum. While the server holds 20 TPS, MSPT is what you should really watch; as long as it stays under 50 ms per tick, the server is healthy.
TPS is 20 but players still say it's lagging. Why?
The issue could be network latency, client FPS or sudden stutters. If the maximum MSPT in /spark tps is high, run the profiler with the --only-ticks-over option to catch those spikes.
Does spark slow down the server?
spark uses sampling, so its overhead is low and it's designed to run on live servers. Still, take recordings of a few minutes while diagnosing instead of leaving the profiler running all the time.
How long should a spark recording be?
For constantly low TPS, 3-10 minutes is usually enough. For rare stutters, record for longer with --only-ticks-over so that only slow ticks are collected.
How do I find out which plugin is causing lag?
Open the sources view in the spark viewer, which adds up time per plugin. A plugin that takes a noticeable share of the Server thread is your first suspect.