Minecraft Server Lag: How to Optimize Chunk Loading and View Distance
# Minecraft Server Lag: How to Optimize Chunk Loading and View Distance
One of the most common causes of lag on Minecraft servers isn't lack of RAM or a weak CPU — it's inefficient chunk loading. When your server constantly generates, loads, and unloads chunks, TPS drops and players complain about stuttering and freezes. This guide walks you through systematically optimizing chunk loading for a smoother experience.
What Is Chunk Lag and Why Does It Happen?
Minecraft divides the world into 16×16-block segments called chunks. For every player, the server must keep a certain number of chunks in memory, process them, and generate new ones on demand. The problem:
- View Distance determines how many chunks are loaded around each player
- Newly generated chunks consume significantly more CPU than loading existing ones
- Too many loaded chunks simultaneously devour RAM and slow down tick processing
With 20 players and a view distance of 10, your server could be handling over 12,000 chunks at once. That's too much for most setups.
Setting View Distance and Simulation Distance Correctly
The most impactful setting is view-distance in server.properties:
view-distance=6
simulation-distance=4
Simulation Distance (introduced in 1.18) is often more important than view distance. It controls how far away mobs tick, redstone fires, and crops grow. Lowering it saves massive amounts of CPU.
Recommended values by server size:
| Player Count | view-distance | simulation-distance |
|---|---|---|
| 1–10 | 8–10 | 5–6 |
| 10–30 | 6–8 | 4–5 |
| 30–100 | 4–6 | 3–4 |
| 100+ | 3–5 | 2–3 |
Paper-Specific Chunk Settings
If you're running Paper (which you should be), paper-world-defaults.yml gives you much finer control:
chunks:
auto-save-interval: 6000
delay-chunk-unloads-by: 10s
entity-per-chunk-save-limit:
experience_orb: 16
arrow: 16
fixed-chunk-inhabited-time: -1
max-auto-save-chunks-per-tick: 24
prevent-moving-into-unloaded-chunks: true
The prevent-moving-into-unloaded-chunks option is especially valuable — it stops players from running into unloaded chunks and forcing generation, which is one of the biggest causes of sudden TPS drops.
World Pregeneration: The Single Biggest Performance Win
The most effective way to eliminate chunk lag is pregenerating your world. If all chunks already exist on disk, the server only needs to load them — not generate them. Loading is up to 10× faster than generation.
Using Chunky
The Chunky plugin is the current standard for world pregeneration:
/chunky radius 5000
/chunky start
This generates a 5,000-block radius around spawn. For most survival servers, a 3,000–5,000 block radius is sufficient. Run pregeneration overnight or during low-traffic hours — it temporarily spikes CPU usage.
Important: Set a world border (/worldborder set 10000) to prevent players from venturing into ungenerated territory.
No-Tick View Distance in Paper
Paper offers a powerful feature called No-Tick View Distance. It lets players see farther without fully simulating distant chunks:
In paper-world-defaults.yml:
viewdistances:
no-tick-view-distance: 12
You can combine simulation-distance=4 with no-tick-view-distance=12. Players see up to 12 chunks away, but only 4 chunks are actively simulated. This gives a visually generous experience with much lower server load.
Async Chunk Loading with Paper and Folia
Vanilla Spigot loads chunks synchronously — the main thread blocks while a chunk loads. Paper has largely resolved this with asynchronous chunk loading, which is one of the biggest reasons to switch if you haven't already.
If you run a large server (50+ players) and need maximum chunk throughput, Folia by PaperMC is worth investigating. Folia distributes chunk processing across multiple threads. However, many plugins aren't yet Folia-compatible, so verify compatibility before switching.
Mob Spawning: The Hidden Chunk Performance Killer
Chunk lag is often compounded by excessive mob spawning. In bukkit.yml:
spawn-limits:
monsters: 50
animals: 10
water-animals: 5
water-ambient: 10
water-underground-creature: 3
ambient: 3
ticks-per:
animal-spawns: 400
monster-spawns: 10
water-spawns: 400
water-ambient-spawns: 400
ambient-spawns: 400
Reducing monsters from the default 70 to 40–50 makes a noticeable difference. Most players won't notice the reduction, but your server will.
In spigot.yml, you can also tune entity activation ranges to prevent off-screen mobs from eating CPU:
world-settings:
default:
mob-spawn-range: 6
entity-activation-range:
animals: 16
monsters: 24
raiders: 48
misc: 8
Monitoring Chunk Performance
Optimizing without monitoring is flying blind. Spark (available as a plugin or built into Paper) shows you exactly which chunks and processes are hurting your TPS:
/spark profiler --only-ticks-over 100
This records a profiling session and highlights ticks that took longer than 100ms — a clear sign of chunk-related bottlenecks.
For ongoing visibility into how your optimizations affect server health over time, [PulseNode](https://pulsenode.tech) provides real-time monitoring of TPS, RAM, and CPU — so you catch performance regressions the moment they happen rather than after players start complaining.
Summary: Your Chunk Optimization Checklist
- Lower view-distance to 6–8 in
server.properties - Set simulation-distance to 3–5 to reduce CPU load
- Enable no-tick-view-distance in Paper for visual range without simulation cost
- Set a world border and pregenerate your world with Chunky
- Reduce mob spawn limits in
bukkit.yml - Use Paper instead of Spigot for async chunk loading
Chunk optimization isn't a one-time task — revisit your settings as your player count grows or when you add new worlds. With the right configuration, your server can run smoothly without expensive hardware upgrades.
---
*Want to know whether your optimizations are actually working? [PulseNode](https://pulsenode.tech) monitors your Minecraft server in real time, giving you instant visibility into TPS, memory usage, and performance trends.*