Reducing Minecraft server lag, a diagnostic checklist

Sep 25, 20256 min read

Reducing Minecraft server lag, a diagnostic checklist

Players say "the server is lagging." That sentence contains five different possible problems. This article walks through them in order, from cheapest to investigate to most expensive to fix, so you can find the actual cause instead of guessing.

The diagnostic order, at a glance

Healthy

Unhealthy

Entities

Chunks

Plugin or mod

Periodic spikes

Long pauses

Yes

No

Player reports lag

Step 0: Ask 'lag' or 'ping'?

Step 1: /tps - is server healthy?

Network or client issue.
Not your problem to fix server-side

Step 2: Run Spark profiler

Step 3: Read flame graph

What dominates?

Step 4: Entity audit

Step 5: Chunk count audit

Step 6: Plugin / mod audit

Step 7: Disk I/O audit

Step 8: GC audit

Resolved?

Done. Document the fix

Step 9: Hardware reality check.
Upgrade clock speed

90 percent of "my server is laggy" tickets resolve in steps 1 through 5. Detail follows.

Step 0: define "lag"

Ask the player:

  • "Does typing a command feel instant?" If yes, ping is fine.
  • "When you place a block, does it appear immediately?" If no, server tick is the issue.
  • "Does it happen all the time or in bursts?" Bursts and constant feel different and have different causes.
  • "Does it happen near specific places?" Localized lag points to specific chunks / entities / contraptions.

The diagnosis often resolves at this step.

Step 1: check TPS

Paper / Purpur: /tps. Fabric with Fabric Carpet: /tick rate. Vanilla: install Spark or a profiler mod.

TPS verdict ranges (Minecraft target: 20 TPS)2017-1914-17Under 14109876543210Player-perceived severity (0 = healthy)

The next steps assume TPS is below healthy.

Step 2: install Spark (if you haven't)

Spark is a profiler for Minecraft servers. Free, lightweight, works on Paper / Purpur / Fabric / Forge. Get it from spark.lucko.me.

The two commands that solve 80 percent of investigations:

/spark profiler start

Run it for a few minutes during normal play. Then /spark profiler stop to get a flame graph link. (Add --thread "Server thread" to the start command if you want to profile only the main tick thread.)

/spark health

Quick overview of TPS, MSPT, CPU, memory.

The flame graph is the truth. Skim it. The widest blocks at the top are what the server is spending its tick time on.

Step 3: read the flame graph

You're looking for the biggest contributor to tick time. Common culprits:

You see this dominating The actual cause
ServerLevel.tick() → EntityTickList.forEach() Too many entities (Step 4)
ServerLevel.tick() → ChunkMap.tick() Too many loaded chunks (Step 5)
RedstoneTorchBlock / DispenserBlockEntity / specific block name A specific contraption (find and rework)
A plugin or mod class showing up frequently That plugin / mod is the culprit (Step 6)

Step 4: entity audit

In Paper / Purpur:

/mspt

shows tick time. Then look at what's loaded in memory:

/spark heapsummary

For entity counts by type and chunk, Paper has:

/paper entity list

Common entity-related causes of lag:

  • Mob farms with broken kill mechanisms. Mobs pile up indefinitely.
  • Item frame / armor stand walls for decoration. Hundreds of them in a small area.
  • Storage drawer mass arrays (modded). Each drawer is a block entity.
  • Animal farms. Twenty cows is fine. Two hundred cows is not.
  • Dropped items. Players empty inventories on the floor, items don't despawn fast enough.

Fixes:

  • Cap mob counts per chunk in spigot.yml / paper-world-defaults.yml.
  • Reduce item despawn time.
  • Periodically clear dropped items: /lagg clear if you have laggremover, or schedule a /kill @e[type=item] task.
  • Reach out to players whose builds are the cause. Politely. With evidence.

Step 5: chunk count audit

Paper:

/paper entity list
/paper chunkinfo

Total loaded chunks across all dimensions matters more than per-player counts.

Players online Healthy loaded chunks Investigate above
1 (you, testing) 400 to 600 1,500
5 1,500 to 3,000 5,000
10 2,000 to 5,000 8,000
20+ 4,000 to 8,000 12,000

Common causes of "too many loaded chunks":

  • Chunk loaders (forceloaded chunks, modded). Players forget they set them.
  • Vanilla nether portals keeping linked chunks loaded.
  • Spawn chunks with permanent forceload (unset if not needed).
  • High view / simulation distance. See the dedicated article on this.

/forceload query shows forceloaded chunks per dimension. Audit periodically.

Step 6: plugin / mod audit

If your flame graph showed a plugin or mod hot:

  1. Check that plugin's config for performance-impacting features.
  2. Check for newer versions of the plugin. Old versions sometimes have known performance bugs.
  3. Disable the plugin in a test environment and confirm the issue is resolved.
  4. If the plugin is essential, look for an alternative.

Common offenders (with reputation for being heavy):

  • Old versions of dynmap (newer versions are better).
  • Some economy plugins that touch the database on every transaction.
  • Anti-cheat plugins doing per-tick checks across all players.
  • Chunk-loading mods with no logging.

Step 7: disk and I/O audit

Modern servers' tick can stall on save spikes if the disk is slow or shared. Symptoms:

  • Lag spikes at regular intervals (every 5 minutes is the default save interval).
  • World save reported as taking hundreds of milliseconds in metrics.

If you're on shared hosting with HDD or slow SSD, this is just a fact of your environment. NVMe-backed hosts don't have this problem.

If you're on capable hardware, check that:

  • Your backup process is not running during play hours.
  • No other heavy I/O service is on the same disk.
  • World save interval (paper-world-defaults.yml) is not set absurdly low.

Step 8: garbage collection audit

If TPS is fine on average but you have periodic 1 to 3 second freezes:

/spark gc

Look at average pause time and max pause time.

GC pause-time verdict (lower is better)Healthy <100msBorderline 100-200msUnhealthy >200ms300280260240220200180160140120100806040200Average pause (ms)

See the JVM flags article.

Step 9: hardware reality check

If you've gone through all the above and the server still chugs, you may be at the limit of the hardware. Check:

  • What CPU is the host running? Look at single-thread benchmark scores. A score below 2500 (Passmark single-thread) is the danger zone for medium / heavy servers.
  • Is the host overcommitted? On shared hosting this is common. Run /spark health and compare reported MSPT to what your host claims.

If hardware is the answer, you upgrade. There's no software trick that makes a slow core fast.

Conclusion

Lag is rarely a single mystery. It's usually one of five identifiable causes, and Spark will tell you which one in five minutes. Don't guess. Profile. Then fix what the profile shows you, not what you assume.


Hosting your game server with AndroHost means we handle most of what's in this post for you automatically: tier sizing, SRV records, off-site backups, DDoS protection.

Browse plans·More posts·Discord