Minecraft Server Hosting Game Servers Pricing Features FAQ About Us Blog
Log In Sign Up
Home › Blog › Tips & Tricks › Minecraft Server Lagging? 10 Causes and How to Fix Them

Minecraft Server Lagging? 10 Causes and How to Fix Them

Why your Minecraft server lags — and what you can do about it

Blocks place themselves with a delay, mobs teleport around and redstone circuits tick out of rhythm. Server lag is the most frustrating problem you can encounter as a Minecraft server operator — and at the same time the most common one. The good news: in the vast majority of cases the cause can be clearly narrowed down and fixed with just a few steps.

This article shows you the ten most common reasons for lag on Minecraft servers and gives you a concrete solution for each point that you can implement right away. Before we dive in, let us briefly clarify the most important metric.

Understanding TPS: your server's heart rate

TPS stands for Ticks Per Second. A Minecraft server runs at 20 TPS — that means the game world is updated 20 times per second. If TPS drop below 20, you experience that as lag. Below 15 TPS the game becomes noticeably sluggish, below 10 TPS it is barely playable.

You can check TPS at any time with the /tps command (available on Paper servers). For a detailed analysis we recommend the spark profiler, which shows you exactly which process consumes how much computing time.

/spark profiler start
# Wait a few minutes, then:
/spark profiler stop

The generated link takes you to an interactive report. With it you can find almost any lag cause.

1. Too little RAM — or too much

The classic. Too little memory leads to constant garbage collection pauses that freeze the server for milliseconds. But too much allocated RAM can also be counterproductive: the garbage collection then needs longer for a single pass, which leads to larger lag spikes.

Solution: Use Aikar's JVM flags, which are specifically optimized for Minecraft servers. They configure the garbage collector so that pauses stay minimal:

java -Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
  -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
  -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
  -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 \
  -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 \
  -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 \
  -XX:G1MixedGCLiveThresholdPercent=90 \
  -XX:G1RCSetUpdatingPauseTimePercent=5 \
  -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem \
  -XX:MaxTenuringThreshold=1 -jar server.jar nogui

Important: Set -Xms and -Xmx to the same value. For a server with 10-20 players, 4-6 GB is a good starting point. For modpacks like ATM10 or RLCraft you need significantly more.

2. Entity flooding

Hundreds of items lying around, dozens of cows stacked on top of each other in a farm pen or an army of aimlessly wandering villagers — entities are one of the biggest performance killers. Every entity has to be calculated on every tick: pathfinding, physics, collision.

Solution: Limit the entity count in the paper-world-defaults.yml (on Paper servers) or via a plugin:

# paper-world-defaults.yml
entity-per-chunk-save-limit:
  experience_orb: 16
  arrow: 8
  area_effect_cloud: 8

spawn-limits:
  monsters: 50
  animals: 8
  water-animals: 3
  ambient: 1

Additionally, the command /kill @e[type=item] helps to immediately remove items lying around in an emergency. In the long run, a plugin like ClearLagg is recommended, which removes items automatically at intervals.

3. Chunk loading out of control

Every player loads chunks around them. With a view distance of 16 and twenty players, the server has to keep thousands of chunks in memory and update them at the same time. That pushes even good hardware to its limits.

Solution: Reduce the view distance in the server.properties and set the simulation distance separately in the spigot.yml:

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

Paper servers also offer a separate setting for the simulation distance, so players can still see far while only nearby chunks are actually calculated. The difference is enormous — reducing the view distance from 12 to 8 almost halves the number of chunks.

4. Inefficient or broken plugins

Plugins are the backbone of every server, but poorly programmed extensions can block the main thread and cause massive lag spikes. Plugins that run synchronous database queries or perform expensive calculations on every tick are particularly problematic.

Solution: Use the spark profiler to identify the worst offenders:

/spark profiler start
# Let it run for 5 minutes
/spark profiler stop

In the result, under the Plugins tab, you can see which plugin uses how much server time. If a plugin sits above 10-15% of tick time, it is a clear candidate for replacement or an update. If you are still deciding which plugins are worth it, take a look at our beginner's guide to Spigot plugins.

5. Redstone machines and hoppers

Giant redstone clocks, hopper chains with a hundred hoppers or fully automatic farms can drive tick time up massively. Hoppers are particularly tricky: each one checks on every tick whether an item is lying above it — with 200 hoppers that is 4,000 checks per second.

Solution: The hopper behavior can be optimized significantly in the paper-world-defaults.yml:

# paper-world-defaults.yml
hopper:
  cooldown-when-full: true
  disable-move-event: false
  ignore-occluding-blocks: false

Also set clear rules for your players: limit the number of hoppers per chunk or use a plugin like HopperOptimizer. For large redstone builds, Folia can also be interesting because it processes regions independently of each other.

6. Worlds with too many loaded chunks (world size)

The older a server gets, the bigger the world. Players explore thousands of chunks, and each of them has to be loaded from disk when entered. On HDDs that takes significantly longer than on SSDs, but even SSDs start to sweat with fragmented worlds.

Solution: Set a world border with the vanilla command:

/worldborder set 20000

That limits the world to a radius of 10,000 blocks from the center. For most servers that is more than enough. Additionally, you can pre-generate chunks to avoid lag when entering new areas:

/chunky radius 5000
/chunky start

The Chunky plugin generates chunks in the background so that players do not have to wait for generation later.

7. The wrong server software

Vanilla Minecraft servers are simply not suited for performance-critical environments. They lack all the optimizations that Paper and its forks have developed over the years: asynchronous chunk loading, optimized entity ticking logic, more efficient lighting calculations and much more.

Solution: Switch to Paper or a Paper fork. Paper is 100% compatible with Spigot plugins and brings massive performance improvements without sacrificing gameplay. For even more performance there are forks like Purpur that offer additional configuration options. On WZH Cloud, all Minecraft servers run on Paper by default — so you start with an optimal foundation right away.

8. A mismatched garbage collection profile

Even with enough RAM, the Java garbage collector can become a problem. Java's default GC profile is not optimized for real-time applications like Minecraft. Long GC pauses of 100-500 milliseconds create regular lag spikes that manifest as brief freezes.

Solution: Check with spark whether GC pauses are the problem:

/spark gc

This command shows you the frequency and duration of GC pauses. If you regularly see pauses above 50ms, the Aikar flags mentioned above are the solution. Also make sure to use Java 21 or newer — the newer Java versions come with significantly improved garbage collectors.

9. Network lag vs. server lag

Not all lag comes from the server. If only individual players are affected, the problem is often on the network side: high ping, packet loss or an unstable connection between player and server.

Solution: Have affected players check their ping (the Tab key shows it). Values above 100ms indicate a poor connection. On the server side you can adjust the network-compression-threshold in the server.properties:

# server.properties
network-compression-threshold=256

A value of 256 is a good compromise between CPU load and bandwidth. If your server is in a data center with a good connection — like the Hetzner infrastructure that WZH Cloud runs on — network lag on the server side is rarely a problem. The bottleneck is then almost always on the player's side.

10. Missing regular restarts

Java applications tend to accumulate memory fragmentation over long uptimes. A Minecraft server that has been running for three weeks almost always performs worse than one that is restarted daily.

Solution: Set up automatic restarts — every 12 to 24 hours is a good rhythm. On Linux servers this works via a simple cronjob:

# Crontab entry: restart daily at 05:00
0 5 * * * /home/minecraft/restart.sh

Warn your players about the restart with a plugin like AutoRestart, which shows a countdown message in chat. The restart itself usually takes less than 30 seconds.

Summary: your checklist against server lag

If your server lags, work through these points systematically:

  1. Check TPS — run /tps and /spark profiler
  2. RAM allocation — use Aikar's flags, set Xms = Xmx
  3. Count entities — set limits in the Paper configuration
  4. View distance — reduce to 8 or less
  5. Check plugins — spark shows you the offenders
  6. Hoppers and redstone — set limits and optimize
  7. World border — limit it and pre-generate with Chunky
  8. Server software — use Paper instead of vanilla
  9. GC pauses — analyze with /spark gc
  10. Restarts — automatically every 12-24 hours

Most lag problems can already be solved with the first five points. For a Minecraft server with 10-30 players, Paper with an optimized configuration and enough RAM is usually completely sufficient. Start with the basics, measure the TPS after each step and work through the list systematically — that way you are guaranteed to find the cause.

Your Cart
🛒

Your cart is empty