Minecraft 26.x and 1.21 Server Lag Fix and Optimization

Published on | Updated

Fix Minecraft server lag on 26.x and 1.21: read /mspt and spark, then Purpur, Java 25 with Aikar's flags, lower simulation distance, entity caps and Chunky.

A Minecraft jungle seen in first person, with tall trees, vines and the hotbar at the bottom

Your server stutters, mobs freeze in place and players complain about rubber banding, on 26.3 or on a world you kept on 1.21.1. Before you buy more RAM, find out which kind of lag you have, because each kind has its own fix. This guide covers Paper, Purpur, Fabric and NeoForge servers. Every version, command and config key below was checked against Mojang's, PaperMC's and Purpur's own documentation on 3 November 2026.

Quick answer: Minecraft 26.x and 1.21 lag is four different problems with four different fixes: slow ticks, chunk generation, garbage collection pauses and network delay. Read /mspt and a spark profile first. Then: 1) run Paper or Purpur instead of vanilla, 2) drop simulation-distance to 4 or 6, 3) start Java 25 (26.x) or Java 21 (1.21.x) with Aikar's flags and -Xms equal to -Xmx, 4) pre-generate the world with Chunky, 5) cap entities in the Paper and Spigot configs. CPU and memory usage on 1.21.1 or 26.3 depends mostly on your plugins, farms and mods, so measure it with spark before you buy hardware.


Server Lag or Client Lag? Check This First

Half the lag reports you get are not server lag at all. Split them before you touch a config file.

Server lag (low TPS) affects everyone at the same time. Mobs freeze in place, blocks break with a delay and pop back, hoppers stall, inventories open slowly. You confirm it with /tps or /mspt.

Client lag (low FPS) affects one player. Their movement stutters, the frame rate drops, but mobs and redstone behave normally for everyone else. They confirm it with the F3 debug screen. The fix is on their machine: lower render distance, a client performance mod, a better GPU. No amount of server RAM helps.

TPS is server side game logic: 20 ticks per second, 50 milliseconds per tick. FPS is client side rendering. A player with 300 FPS still sees rubber banding when server TPS sits at 14.

What Your TPS Number Means

  • 20 TPS, perfect, every tick finishes inside its 50ms budget
  • 15 to 19 TPS, mild lag, movement stutters and redstone gets sloppy
  • 10 to 14 TPS, heavy lag, block delays and mob freezing
  • Below 10 TPS, effectively unplayable

Anything consistently below 19.5 is worth investigating.


The Four Types of Minecraft Server Lag

Before you fix anything, classify what you are seeing. Throwing RAM at a network problem does nothing, and a faster CPU will not stop a garbage collection freeze.

1. TPS Lag (Tick Lag)

Symptoms: block break delays, mob AI freezing, redstone misfiring, items stuck in hoppers, /mspt above 50.

What is happening: the main thread cannot finish the game logic inside 50ms, so the server falls behind.

2. Chunk Loading Stutter

Symptoms: smooth at spawn, hitches or full freezes when players walk or fly into new terrain. Elytra flight is the worst case.

What is happening: the server is generating terrain live, which loads the CPU and the disk at the same time.

3. Garbage Collection Lag

Symptoms: the server runs fine for a few minutes, freezes solid for a noticeable moment, then resumes. The pattern repeats on a rhythm.

What is happening: the JVM is pausing the game threads to clean up unused memory.

4. Network Lag (Desync)

Symptoms: players rubber band backwards, broken blocks reappear, hits do not register. Only some players are affected, not the whole server at once.

What is happening: packets between client and server are delayed or dropped. TPS can be a flat 20.0 while this is going on.


How to Check TPS and MSPT on a Minecraft Server

/tps and /mspt (Paper and Purpur)

/tps

Output:

TPS from last 1m, 5m, 15m: 19.8, 19.9, 20.0

TPS alone hides how close you are to the edge. A server at 20.0 TPS with 49ms ticks is one mob farm away from falling behind. /mspt shows the average, minimum and maximum milliseconds per tick over the last 5, 10 and 60 seconds:

/mspt
  • Below 40ms, healthy, room to grow
  • 40 to 50ms, warning zone, any spike drops ticks
  • Above 50ms, the server can no longer hold 20 TPS

PaperMC's own command reference says both commands work fine but are superseded by /spark, so use /spark tps for the fuller picture.

/tick query (Vanilla and Fabric)

A vanilla or Fabric server has no /tps. Since 1.20.3 it has /tick query, which prints the target tick rate, the average time per tick and percentiles of the time per tick. Install the spark mod for the rest of this guide's measurements.

Checking Garbage Collection Activity

If the freezes are rhythmic, check the collector. /spark gc prints the server's garbage collection history and /spark gcmonitor toggles live reports of each collection. For a log file, PaperMC's Aikar's flags page gives this flag for Java 11 and newer:

-Xlog:gc*:logs/gc.log:time,uptime:filecount=5,filesize=1M

It keeps five files of 1MB each, and Paper's docs say GC logging does not hurt performance and can stay on. In the log, look for lines with Pause Full. The number at the end of a pause line is how long the game stopped, in milliseconds. Aikar's flags aim for pauses of at most 200ms, about 4 ticks, so regular pauses far above that are your problem.


What Changed in 1.21 and 26.x for Server Performance

Mojang's version numbers now follow the year: after 1.21.11 (December 2025) came 26.1 (March 2026), 26.2 (June 2026) and 26.3 (15 September 2026), the current release. These are the changes that matter for lag:

VersionChangeWhat it means for lag
1.21 (June 2024)Trial Chambers, the Breeze, Wind ChargesNew structures with spawners, a mob with its own AI, extra projectiles in combat
1.21.2Thrown ender pearls load and tick a 3x3 chunk areaPearl stasis chambers keep chunks ticking while their owner is online
1.21.9Spawn chunks and the spawnChunkRadius game rule removedFarms at spawn stop when nobody is near; use /forceload for what must stay loaded
26.1The game requires Java 25; Overworld data moved to dimensions/minecraft/overworldA Java 21 start script no longer boots the server; backup scripts need the new paths
26.3Mojang lists "Improvements to chunk generation performance" and new terrain (Dappled Forest, Abandoned Camps)Generation got cheaper, but pre-generating still moves the cost out of play time

Paper changed too. It has bundled the spark profiler since 1.21 and turned the old Timings profiler off by default. Its tick loop was rewritten in October 2025, and current Paper builds no longer print the vanilla "Can't keep up" warning, so a quiet console on 26.x proves nothing. After a lag spike, Paper catches up at most 5 ticks by default (catchup-ticks in the global config).

How much extra load a new version adds depends on your world and players, so we will not put a percentage on it. If your server started lagging after an update, compare /mspt and a spark profile from before and after.


Step 1: The Right Server Software (Vanilla vs Spigot vs Paper vs Purpur)

For a plugin server, the order is simple:

  1. Purpur, server software "based on Paper" (in Purpur's own words) that runs Bukkit, Spigot and Paper plugins and adds a very large set of extra options.
  2. Paper, the base most servers should start from: entity activation ranges, per player mob spawns, alternative redstone implementations, hopper options and spark built in.
  3. Spigot, far fewer optimizations than Paper. No performance reason to stay on it.
  4. Vanilla, none of the above. Fine for a small private world.

Older charts put Pufferfish between Paper and Purpur. Pufferfish's newest download is 1.21.8 (checked 3 November 2026), so it is not an option for a 26.x server.

FeatureVanillaPaperPurpur
Entity activation rangeNoYes (spigot.yml)Yes (from Paper)
Per player mob spawnsNoYesYes (from Paper)
Alternate Current redstoneNoYesYes (from Paper)
Villager lobotomize optionNoNoYes
Per mob gameplay settingsNoNoYes

Installing Purpur

Downloads are at https://purpurmc.org/downloads, and Purpur's API serves the newest build per version:

# SSH to your VPS
ssh root@your-vps-ip

# Create server directory
mkdir -p /opt/minecraft-server
cd /opt/minecraft-server

# Newest Purpur build for 26.3 (put 1.21.1 in place of 26.3 to stay on 1.21.1)
wget https://api.purpurmc.org/v2/purpur/26.3/latest/download -O purpur.jar

# 26.x needs Java 25, 1.21.x needs Java 21
java -version

# Accept the Minecraft EULA
echo "eula=true" > eula.txt

First start, which generates the config files:

java -Xms4G -Xmx4G -jar purpur.jar --nogui

When the console says the server is done loading, type stop. You now have every config file you need for the next steps.


Step 2: server.properties (View Distance and Simulation Distance)

nano server.properties
# Chunks around each player that are simulated: mobs, crops, redstone
# Default 10, lower it to 4 or 6. This is the single most important setting
simulation-distance=4

# Chunks around each player that are sent to the client
# Default 10. Costs memory and bandwidth more than tick time
view-distance=10

# Packets larger than this many bytes are compressed (default 256)
network-compression-threshold=256

Why Simulation Distance Matters More Than View Distance

The server works on a square of chunks around each player, (2 × distance + 1)² chunks in total:

Simulation DistanceChunks in the squareShare of the default
10 (default)441 chunks100%
6169 chunks38%
481 chunks18%

Going from 10 to 4 cuts the area the server simulates around each player by more than 80%. Players barely notice. Farms only run when someone is closer, and mobs spawn closer, that is the whole trade.

View distance is a different budget. It decides how many chunks the server keeps tracked and sent to each client, so it costs memory and bandwidth. Cut simulation distance first. If you are still over 50ms MSPT, bring view distance from 10 down to 6 or 8, which cuts the chunks tracked and sent per player by a third or more.

Older guides also tell you to shrink the spawn chunk radius. Spawn chunks no longer exist since 1.21.9. Run /forceload query instead to see how many chunks are still forced to stay loaded in your dimension.


Step 3: purpur.yml (Villagers and Zombies)

nano purpur.yml
world-settings:
  default:
    mobs:
      villager:
        lobotomize:
          enabled: true
          check-interval: 100
      zombie:
        aggressive-towards-villager-when-lagging: false

Lobotomize villagers. Purpur's docs describe it as: "Lobotomizes the villager if it cannot move (Does not disable trading)". Villagers locked in a trading hall stop running their AI, and check-interval sets how often, in ticks, Purpur checks for that. On a server with a big trading hall this is one of the largest single wins available. Set wait-until-trade-locked: true under lobotomize if villagers should keep their AI until someone has traded with them.

Zombies and villagers. With aggressive-towards-villager-when-lagging: false, zombies stop chasing villagers while the server is lagging. Purpur counts the server as lagging below 19.0 TPS (lagging-threshold in the global settings).


Step 4: spigot.yml (Entity Activation and Despawn Rates)

nano spigot.yml
world-settings:
  default:
    mob-spawn-range: 6

    entity-activation-range:
      animals: 16
      monsters: 24
      raiders: 48
      misc: 8
      water: 8
      villagers: 16
      tick-inactive-villagers: false

    entity-tracking-range:
      players: 48
      animals: 48
      monsters: 48
      misc: 32

    item-despawn-rate: 3000
    arrow-despawn-rate: 600

    merge-radius:
      item: 4.0
      exp: 6.0

Entity activation range is how far from a player entities tick normally; outside it they tick less often, per Paper's reference. The defaults are generous: 32 for animals, monsters and villagers, 64 for raiders, 16 for misc and water mobs. With animals at 16, a cow 20 blocks away ticks less often until someone comes closer. Paper's reference warns that outside the misc range, items in water streams "may appear to visually lag, rubber-band, or move backward", so raise misc again if your item sorters look broken.

Entity tracking range decides how far away players see other entities. Paper lists defaults of 128 for players and 96 for animals, monsters and misc, so at 48 other players and mobs only show up once they are closer.

Despawn and merge. item-despawn-rate: 3000 halves the default of 6000 ticks, and the merge radius combines dropped items and experience orbs into fewer entities (defaults 0.5 for items, off for orbs).

Growth modifiers in the same file are often set the wrong way round. 100 is vanilla speed, and a higher value makes crops grow faster, not slower. Paper's documentation describes it as "The growth modifier percentage for cactus, where Vanilla speed is 100%". Lowering the values slows farms down, but the server still random ticks those blocks, so it is not a real performance fix. Leave them at 100 and handle farm output with entity limits and item merging instead.


Step 5: paper-world-defaults.yml (Paper Specific)

nano config/paper-world-defaults.yml
entities:
  spawning:
    per-player-mob-spawns: true
    alt-item-despawn-rate:
      enabled: true
      items:
        cobblestone: 300
        netherrack: 300
        sand: 300
        gravel: 300

collisions:
  # Stops mob grinders from turning into a physics simulation
  max-entity-collisions: 2

chunks:
  max-auto-save-chunks-per-tick: 8
  prevent-moving-into-unloaded-chunks: true

environment:
  optimize-explosions: true

hopper:
  disable-move-event: true

misc:
  redstone-implementation: ALTERNATE_CURRENT
  update-pathfinding-on-block-update: false

What each block does, and the catch where there is one:

  • per-player-mob-spawns is already true in current Paper. Check that nobody turned it off, because without it one player in a mob farm eats the whole mob cap.
  • alt-item-despawn-rate makes junk blocks despawn after 300 ticks (15 seconds) instead of the normal rate.
  • max-entity-collisions: 2 (default 8) stops collision checks after two entities.
  • max-auto-save-chunks-per-tick: 8 (default 24) spreads auto save over more ticks.
  • hopper.disable-move-event: true dramatically improves hopper performance, according to Paper, but it "will break protection plugins and any others that depend on this event". Leave it off if you run land claims or shop plugins that protect chests.
  • redstone-implementation: ALTERNATE_CURRENT swaps in a faster redstone dust implementation. Paper notes it changes how redstone dust behaves, so test technical builds before you switch.
  • update-pathfinding-on-block-update: false, according to Paper, "can improve the server performance significantly, while there is almost no noticeable effect on the game mechanics". It helps most with many loaded entities next to farms or redstone clocks.

Anti-Xray (anticheat.anti-xray) is not a performance setting. If you run it on a public server, compare /mspt with it on and off.


Step 6: bukkit.yml (Global Spawn Caps)

spigot.yml controls range, bukkit.yml controls raw counts:

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

The default monster cap of 70 is high for a server with plugins. Dropping to 50 costs little in gameplay and takes real work off the tick. Paper's world config has the same caps per world under entities.spawning.spawn-limits, where -1 uses the bukkit.yml value.


Step 7: How Much RAM to Allocate (Memory Usage on 1.21.1 and 26.x)

Server TypePlayersMods/PluginsMinimum RAMRecommended RAM
Vanilla or Paper1 to 10None2GB4GB
Vanilla or Paper10 to 20None4GB6GB
Vanilla or Paper20 to 50None6GB8GB
Light plugins10 to 2010 to 154GB6GB
Heavy plugins20 to 5020+8GB12GB
Light modpack1 to 1050 to 1004GB6GB
Heavy modpack1 to 10150+6GB8 to 12GB
Large modpack10 to 20200+12GB16 to 24GB

PaperMC's docs go further and recommend at least 6 to 10GB for G1 "no matter how few players", because G1 works better with more memory. Small worlds run on less, but headroom helps.

Three mistakes that cost more performance than they buy:

  • Do not give every byte to Java. Java needs memory on top of -Xmx. PaperMC's advice: lower -Xmx and -Xms by about 1000 to 1500MB below what the machine has, so with 8GB, use about 6500MB. A host that starts swapping is far slower than a host with a smaller heap.
  • Do not buy 32GB for one server. Paper's docs put it bluntly: 32GB "will only waste your money with minimal returns".
  • Do not guess. Run /spark heapsummary and size the heap to what the server actually holds.

Set -Xms and -Xmx to the same value. Paper's explanation: if -Xms is lower than -Xmx, you have unused memory, and G1 works better with all of it from the start.


Step 8: Java Version and Startup Flags (Aikar's Flags)

8.1 Use the Right Java

Mojang's version files list Java 25 for 26.3, and the 26.1 release notes say "The game now requires Java 25". Versions 1.20.5 to 1.21.11 run on Java 21. Check with java -version before you start. A 26.x server on Java 21 will not boot at all. More detail in Minecraft server Java version requirements.

8.2 Aikar's Flags in a Start Script

A plain java -jar server.jar runs with untuned collector settings. These are the flags from PaperMC's Aikar's flags page, here for a 4GB heap:

nano start.sh
#!/bin/bash
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:G1HeapWastePercent=5 \
  -XX:G1MixedGCCountTarget=4 \
  -XX:InitiatingHeapOccupancyPercent=15 \
  -XX:G1MixedGCLiveThresholdPercent=90 \
  -XX:G1RSetUpdatingPauseTimePercent=5 \
  -XX:SurvivorRatio=32 \
  -XX:+PerfDisableSharedMem \
  -XX:MaxTenuringThreshold=1 \
  -Dusing.aikars.flags=https://mcflags.emc.gs \
  -Daikars.new.flags=true \
  -jar purpur.jar --nogui
chmod +x start.sh
./start.sh

For a 6GB server, replace -Xms4G -Xmx4G with -Xms6G -Xmx6G. Nothing else changes. PaperMC also has a script generator on its docs site if you want the file built for you.

8.3 ZGC as an Alternative on Larger Heaps

Aikar's G1 flags are what PaperMC documents, and you should start there. Some admins with large heaps switch to ZGC instead. OpenJDK describes ZGC's pause times as "consistently measured in microseconds", against G1 pauses that "range from milliseconds to seconds". It is not in Paper's docs, so treat it as a test and compare /spark gc before and after:

java -Xms8G -Xmx8G \
  -XX:+UseZGC \
  -XX:+AlwaysPreTouch \
  -XX:+DisableExplicitGC \
  -jar purpur.jar --nogui

On Java 25 (26.x) -XX:+UseZGC already runs Generational ZGC. Older guides add -XX:+ZGenerational; since JDK 24 that option is obsolete and only prints a warning, so leave it out. On Java 21 (1.21.x) do add -XX:+ZGenerational, because generational mode only became the default in JDK 23. More on flag choice in Aikar's flags explained.


Step 9: Performance Mods for Fabric and NeoForge Servers

Mods do not load on Paper or Purpur, and plugins do not load on Fabric or NeoForge. On a modded server, these are the ones worth knowing (Modrinth, checked 3 November 2026):

ModBuilds for 26.3What it does
LithiumFabric, NeoForgeOptimizes game physics, mob AI and block ticking "with the goal of not changing any vanilla mechanics"; players do not need it installed
FerriteCoreFabric, NeoForge"Memory usage optimizations"; the saving depends on the pack
KryptonFabric onlyOptimizes the networking stack
ModernFixNone yet (newest is for 26.1.2)Performance, memory and bug fixes; builds for 1.20.1 Forge and 1.21.1 NeoForge packs
sparkFabric, NeoForge, ForgeThe profiler this guide uses, as a mod

Download each file from its Modrinth page for your exact game version and loader and put it in mods/. Skip Entity Culling on the server: Modrinth lists it as client side only, so it does nothing on a dedicated server.

Install these one at a time and check /mspt after each. Stacking five optimization mods blind is how you end up with a crash you cannot attribute.


How to Fix Lag Spikes Every 30 Seconds (Garbage Collection)

This is the rhythmic freeze: fine for a few minutes, then a hard stop for a noticeable moment, then fine again.

  1. Confirm it. Run /spark gcmonitor or add the GC log flag from above and look for long pauses.
  2. Set -Xms equal to -Xmx.
  3. Use Aikar's flags, and the right Java for your version.
  4. Do not fix it by allocating far more memory. Size the heap with /spark heapsummary instead.

If the pauses continue with Aikar's flags and a correctly sized heap, you are not looking at a GC problem. Profile with spark instead.


How to Fix Chunk Loading Lag: Pre-Generate the World

If the server is smooth at spawn and hitches whenever someone explores, you are paying for terrain generation live, during ticks. Generate it up front instead.

Install the Chunky plugin (or the Chunky mod on Fabric and NeoForge), set a world border and run it with nobody online:

/worldborder center 0 0
/worldborder set 10000
/chunky worldborder
/chunky start

/worldborder set takes the diameter, so this is a 10,000 by 10,000 block area around 0, 0, and /chunky worldborder copies the border into Chunky's selection. Chunky's default target is the Overworld; pick another world with /chunky world <name>. Follow the task with /chunky progress. Depending on the CPU and disk it can take hours, and it is the single best thing you can do for a server whose players roam.

Chunk loading is an I/O operation before it is anything else, so pre-generation works best on NVMe. See the storage table further down. Full walkthrough in the world pre-generation guide.


Entity and Mob Management (Farms, Items, Grinders)

Entities are the most common cause of TPS lag on an established server, because entity load grows every week the server is up while the config stays where you left it.

Mob grinders, iron farms and villager breeders are where the entities come from. The caps in bukkit.yml, max-entity-collisions: 2 and lobotomized villagers do more than any cleanup plugin, because they stop the entities from existing instead of deleting them after they have cost you ticks. A spark profile shows which entities and chunks take the most time, and pearl stasis chambers keep a 3x3 chunk area loaded per pearl while the owner is online.


How to Find the Plugin or Mod That Is Causing Lag

spark, the Profiler Worth Learning

Paper has shipped spark built in since 1.21, so on Paper you do not install anything. Type /spark first. If the command is unknown on your server, get the plugin or mod from spark.lucko.me/download.

/spark profiler start
# let it run a few minutes during real activity
/spark profiler stop

spark returns a web link with a call tree: which plugin, which mod, which task. It tells you the answer instead of letting you guess. During an intermittent problem, run it longer. PaperMC's docs use this command, which stops by itself after 10 minutes:

/spark profiler start --timeout 600

There is a deeper walkthrough in the spark profiler guide.

Memory side:

/spark heapsummary
/spark heapdump

heapdump writes a full .hprof snapshot of the heap to disk, so check free disk space first.

What About Timings?

Paper's docs say Timings has been unmaintained for years, is turned off by default since 1.21 and is deprecated in favor of spark. Old guides that tell you to run /timings paste are out of date.

Plugins That Commonly Cost You Tick Time

Costly choiceBetter alternative
WorldEdit on a large pasteFastAsyncWorldEdit (FAWE)
An outdated EssentialsX buildCurrent EssentialsX
PermissionsExLuckPerms
An old Multiverse buildCurrent Multiverse

The pattern is version age, not brand. Abandoned permissions plugins and old world editors are the usual suspects, and heavy logging plugins are worth checking with spark before you blame the hardware.


Which CPU Do You Need for a Minecraft Server?

Minecraft's main game loop runs on one thread. Single core speed beats core count, every time. Sixteen slow cores lose to four fast ones on the tick loop.

Look at the boost clock and the generation of the chip, and avoid old Xeons in the 2.4GHz range and budget Celerons. They do fine on web workloads and fall apart on a tick loop.

Paper moves some work off the main thread, such as chunk loading and generation, so extra cores are not wasted, but they never turn a slow core into a fast one. More on picking a processor in the best CPU for a Minecraft server.


Storage: NVMe vs SSD vs HDD

TypeChunk loadingAuto savePrice
HDDSlow, visible during explorationCan cause noticeable freezesCheap
SATA SSDMuch fasterUsually a small hitch at mostStandard
NVMeFastestRarely noticeableNow common on game hosts

Chunk loading and the auto save, every 6000 ticks (5 minutes) by default in bukkit.yml, are both I/O bound. On an HDD backed server, the auto save alone is enough to produce a visible freeze on a schedule.


How to Fix Rubber Banding and High Ping (Network Lag)

Network lag looks like server lag to players and nothing like it in the metrics. TPS reads 20.0, MSPT is healthy, and people still teleport backwards.

  1. Check who is affected. If it is one or two players, the problem is their connection or their route, not your server. Have them run a traceroute during a lag episode.
  2. Check the server location against your player base. Latency decides how block placement, PvP hits and inventory actions feel. Ping depends mostly on distance, so a server on the wrong continent feels laggy however fast it is. Have a few players read their ping in the multiplayer server list before you move anything.
  3. Look at the time of day. Packet loss at peak hours that is gone at 4 AM points to the network, not your config.
  4. Rule out an attack. If lag spikes line up with specific events or repeat at odd times, check whether the server is being hit. See DDoS protection for Minecraft servers.
  5. Keep compression at the default in server.properties:
    network-compression-threshold=256
    
    Lower values compress more packets, which saves bandwidth and costs CPU.

How to Fix the "Can't Keep Up, Is the Server Overloaded" Warning

Vanilla, Fabric and NeoForge servers print this when a run of ticks could not finish in time:

[WARN] Can't keep up! Is the server overloaded? Running 5000ms or 100 ticks behind

The server is behind its 50ms per tick schedule, which is the rubber band players feel. Current Paper builds do not print the line, so on Paper read /mspt and spark instead.

Three causes, in order of frequency:

  1. Simulation distance too high. Drop it to 4.
  2. Redstone and hoppers. Use spark to find the chunks with the most block entities. Water streams move items for free where hoppers cost a check per tick, and Paper's hopper and redstone-implementation options from Step 5 help.
  3. Not enough CPU. Fewer players or a faster core.

High RAM Use and Server Crashes

Diagnose before you buy memory:

/spark heapsummary
/spark heapdump

Common causes:

  1. Chunks kept loaded on purpose. Run /forceload query, and look for pearl stasis chambers and chunk loaders from mods.
  2. A mob farm running unattended. Cap it with entity-activation-range, the spawn caps and lobotomized villagers.
  3. A leak in a plugin or mod. The heap dump names the class holding the memory. Disable the suspect and watch whether the curve changes.

A server that crashes with OutOfMemoryError after several hours is leaking, not undersized. Adding RAM only moves the crash later in the day.


When the Hardware Is Actually the Problem

Most lag is configuration. Some of it is not, and it is worth knowing the difference before you spend money.

You have genuinely outgrown the machine when all of the following are true:

  • spark shows the server tick itself as the bottleneck, not a named plugin or mod
  • The main thread sits pinned at 100% CPU
  • Adding players or loaded chunks drops TPS proportionally, in a straight line
  • You have already pre-generated the world, tuned the collector and cut simulation distance

At that point the only fix is more single core performance and faster storage. Everything else you do is rearranging the same workload.


Optimization Checklist

server.properties:

  • simulation-distance=4 (6 at most)
  • view-distance=10, lower to 6 or 8 only if MSPT is still high

purpur.yml:

  • mobs.villager.lobotomize.enabled: true
  • mobs.zombie.aggressive-towards-villager-when-lagging: false

spigot.yml:

  • mob-spawn-range: 6
  • entity-activation-range reduced, tick-inactive-villagers: false
  • item-despawn-rate: 3000, merge-radius.item: 4.0

Paper world config:

  • per-player-mob-spawns: true
  • alt-item-despawn-rate.enabled: true
  • max-entity-collisions: 2
  • optimize-explosions: true
  • update-pathfinding-on-block-update: false

bukkit.yml:

  • spawn-limits.monsters: 50

Startup:

  • Java 25 for 26.x, Java 21 for 1.21.x
  • Aikar's flags, or a tested ZGC line
  • -Xms equal to -Xmx
  • 1000 to 1500MB left free for the operating system

World:

  • World border set
  • Pre-generated with Chunky

Monitoring:

  • spark working (/spark tps)
  • /mspt checked after every change, one change at a time

Where to Start Tomorrow

If you only have an hour, do these in order and check /mspt between each one:

  1. Move to Paper or Purpur if you are on vanilla or Spigot.
  2. Set simulation-distance=4.
  3. Fix the Java version and the startup flags, with -Xms equal to -Xmx.
  4. Set a world border and pre-generate it with Chunky.
  5. Run a spark profile under load and read the top of the call tree.

Steps 1 through 3 take about 20 minutes and cover most of the distance. Step 5 is what stops you from guessing on everything after that.

We will not show you a made-up before and after table, because the gain depends on your world, plugins and players. Write down /tps, /mspt and the RAM graph on a busy evening before you change anything, and again on a comparable evening afterwards.


FAQ

Why is my server lagging with only 5 players?

Player count is rarely the cause. Run /mspt first: if TPS is 20 and MSPT is under 40ms, the lag is on the client or the network. Otherwise check that the host is not swapping, that the CPU boosts to 3.5GHz or more, and run a spark profile. On a five player server, one bad plugin or one farm is usually the whole problem. It is almost never a shortage of memory.

Why does the server only lag at certain times?

Rhythmic lag has a scheduler behind it. The usual candidates: the auto save every 5 minutes (painful on slow storage), garbage collection on a rhythm, backups running at peak time, scheduled tasks inside plugins, and cleanup plugins sweeping entities. Run /spark profiler start --timeout 600 across a full cycle and match the spike to the schedule.

Can one Minecraft server hold 100 or more players?

Yes, with a fast single core CPU, NVMe storage, Paper or Purpur, a pre-generated world and a plugin list audited with spark. Past a certain size, the answer is not a bigger box but a proxy: split lobby, survival and minigames across backend servers behind Velocity or BungeeCord. See Velocity vs BungeeCord.

Which Java version does a Minecraft 26.x server need?

Java 25. Mojang's 26.1 release notes say "The game now requires Java 25", and the version file for 26.3 lists Java 25 too. Servers on 1.20.5 to 1.21.11 use Java 21. If you move a 1.21.1 world to 26.3, back it up first and update Java and your start script in the same step.

Does 26.x use more CPU and memory than 1.21.1?

Neither Mojang's release notes nor PaperMC's docs give CPU or memory figures per version. The 26.3 notes list improvements to chunk generation performance and to locating structures, while each drop also adds terrain, mobs and blocks. On a real server, plugins, farms and mods move CPU and memory usage far more than the game version. Measure your own: a spark profile and /spark heapsummary on 1.21.1, then the same on 26.3 with the same world copy.


Hosting it with us? On Space-Node Minecraft hosting, Standard plans in Europe run on a shared CPU (an AMD EPYC 7443 in Hengelo, other models elsewhere), Standard plans in Canada on a shared CPU, and Premium plans in Europe on the Ryzen 9 9950X or 7950X. Every plan has NVMe storage and supports Purpur, and plans start at €2.70 per month for MC Coal (3GB), as of 30 October 2026.

Related guides:

Sources

All opened on 3 November 2026: