Minecraft

Fixing Minecraft Server Lag: TPS, MSPT and Profiling With Spark

Diagnose and fix Minecraft server lag — understanding TPS and MSPT, profiling with spark, and the configuration changes, entity limits and pre-generation that help most.

On this page
  1. Server lag vs other lag
  2. TPS and MSPT
  3. Profile with spark
  4. The most common causes and fixes
  5. Server software matters
  6. A lag-fixing checklist
  7. Hosting
  8. Summary

“The server is lagging” can mean several different things: players rubber-banding, blocks reappearing after being broken, mobs freezing, chunks loading slowly. Some of it is the server, some is the network, and some is players’ own computers. This guide shows how to tell which is which, measure what’s slow with spark, and fix the most common causes.

Server lag vs other lag

  • Server lag (low TPS): everyone experiences it at once — mobs freeze, crops stop growing, blocks reappear, time slows down.
  • Network lag (latency): only some players are affected; others play normally. Their ping is high, often because of distance or their connection.
  • Client lag (low FPS): one player’s game stutters while others are fine. That’s their computer, shaders or render distance.

Only the first is fixed on the server. Check whether everyone is affected before changing anything.

TPS and MSPT

Minecraft’s server runs a game loop called a tick, targeting 20 ticks per second — one tick every 50 milliseconds.

  • TPS (ticks per second) — how many ticks the server actually completes. 20 is perfect; below about 18, players notice.
  • MSPT (milliseconds per tick) — how long each tick takes. Under 50 ms, the server keeps up. Above 50 ms, TPS drops below 20.

MSPT is the more useful number: a server at 20 TPS with 45 MSPT is close to its limit, while one at 20 TPS with 15 MSPT has plenty of headroom. Paper shows both with /mspt and /tps.

Profile with spark

spark is the standard performance profiler, available as a plugin for Paper and a mod for Fabric and Forge. Install it, then:

/spark tps                 # TPS and MSPT over recent intervals
/spark health              # TPS, MSPT, CPU, memory, disk
/spark profiler start      # begin sampling
... wait during a period of lag (a few minutes) ...
/spark profiler stop       # uploads a report and gives you a link

The report shows where tick time goes, as an expandable tree. Look for the biggest branches under the server tick:

  • Entity ticking — too many mobs, items or specific entity types (villagers, minecarts).
  • Block entity ticking — hoppers, furnaces, modded machines.
  • Chunk loading/generation — players exploring new terrain.
  • A specific plugin — its name appears in the tree, showing exactly how much time it uses.

Profile during lag. A profile taken while the server is quiet shows nothing useful.

The most common causes and fixes

1. View distance too high

Every player keeps a square of chunks loaded around them. View distance 10 means 21×21 = 441 chunks per player; 6 means 169. Lowering it is the single most effective change.

# server.properties
view-distance=8
simulation-distance=6

simulation-distance controls how far entities and blocks actually tick, and can be lower than view distance — players still see far, but the server only simulates nearby.

2. World generation during play

Generating new chunks is expensive, especially with terrain mods. When several players explore in different directions, TPS collapses. Pre-generate the world inside a world border with Chunky before players join — see pre-generating your world with Chunky.

3. Too many entities

Mob farms, item piles, villager halls and minecart systems add up. spark will show entity ticking near the top. Fixes:

  • Use Paper’s entity settings to limit mobs and merge items. In paper-world-defaults.yml, options include per-chunk entity limits and item merge radius; in spigot.yml, entity activation ranges control how often distant entities tick.
  • Find and clean up problem areas: /spark profiler and Paper’s /paper entity list help locate crowded chunks.
  • Set community rules for farm sizes.

4. Hoppers and redstone

Large hopper chains and constant redstone clocks tick every tick. Paper includes hopper optimisations; configure them in the Paper config, and ask players to use item-efficient designs.

5. A heavy plugin

If a plugin dominates the spark report, check for updates, review its configuration (scan intervals, caching), or replace it. One inefficient plugin can use more tick time than the rest of the server.

6. Garbage collection pauses

If spark shows regular lag spikes that line up with garbage collection, the JVM needs better flags or a correctly sized heap. Use Aikar’s flags and set -Xms equal to -Xmx — see Aikar’s flags and JVM tuning.

7. Slow storage

Chunk loading and saving hit the disk constantly. Slow disks cause lag spikes when players explore or during autosaves. NVMe storage largely eliminates this.

8. Not enough CPU speed

The main tick runs on one thread. A server with many cores but slow ones struggles, while a fast core keeps MSPT low. If your profile is clean and MSPT is still high, the hardware may be the limit.

Server software matters

Paper and Purpur include many performance improvements over Spigot and vanilla — often the difference between holding 20 TPS and not. If you’re on Spigot or vanilla, switching to Paper is usually the first fix to try. See Paper vs Spigot vs Purpur. On Fabric, performance mods like Lithium and FerriteCore help significantly.

A lag-fixing checklist

  1. Confirm it’s server lag (everyone affected, TPS below 20).
  2. Run /spark profiler during the lag and read the report.
  3. Lower view and simulation distance.
  4. Pre-generate the world and set a world border.
  5. Limit entities and clean up problem farms.
  6. Update, reconfigure or replace heavy plugins.
  7. Use Aikar’s flags with a right-sized heap.
  8. Make sure you’re on Paper/Purpur (or Fabric with performance mods).
  9. If MSPT is still high on a clean profile, consider faster hardware.

Hosting

Kerit Cloud’s Minecraft hosting runs on high single-core-performance CPUs with NVMe storage — the two things that matter most for tick rate and world loading — and every server is custom-quoted so CPU cores and RAM match your plugin load and player count. The team can also help with plugin and performance questions through 24/7 Discord support.

Summary

Lag is either server-side (low TPS, everyone affected), network latency or client FPS. For server lag, measure MSPT and profile with spark during the problem, then fix the usual culprits: high view and simulation distance, world generation during play, too many entities and hoppers, heavy plugins, GC pauses and slow storage. Paper, pre-generation and sensible entity limits solve most cases; fast single-core CPUs and NVMe handle the rest.