How to Optimize Your Minecraft Server Performance
How to Optimize Your Minecraft Server Performance
Minecraft servers measure performance in TPS (ticks per second). A healthy server runs at 20 TPS. When TPS drops, players experience lag — delayed block breaking, rubber-banding, and slow mob behaviour.
Check Your Current TPS
If you're running Paper, Spigot, or Purpur, run this in the console:
tps
Output looks like: TPS from last 1m, 5m, 15m: 20.0, 19.98, 19.95
Here's what different TPS ranges feel like in-game:
| TPS | Status | Player Experience |
|---|---|---|
| 19–20 | Perfect | Smooth gameplay, no noticeable issues |
| 15–18 | Minor lag | Slight delays in block breaking and mob movement |
| 10–14 | Significant lag | Rubber-banding, delayed interactions, mobs freezing |
| Below 10 | Severe | Virtually unplayable — chunks won't load, commands delayed |
Anything consistently below 18 TPS needs attention.
Quick Wins
1. Reduce View Distance
In server.properties:
view-distance=8
simulation-distance=6
View distance controls how far players can see. Simulation distance controls how far the server processes entities and redstone. Lowering these is the single most impactful change.
2. Use Paper or Purpur Instead of Vanilla/Spigot
Paper and Purpur include dozens of performance patches over vanilla Minecraft. If you're running Vanilla or Spigot, switching to Paper is the biggest free performance gain. See How to Change Your Minecraft Server Version.
3. Limit Entity Counts
Excessive mobs cause lag. In bukkit.yml (Paper/Spigot servers):
spawn-limits:
monsters: 50
animals: 8
water-animals: 3
water-ambient: 5
water-underground-creature: 3
axolotls: 3
ambient: 1
These are per-player limits. Defaults are higher — reducing them noticeably helps TPS.
Also tune entity activation ranges in spigot.yml to reduce how far away the server processes mob AI:
entity-activation-range:
animals: 16
monsters: 24
raiders: 48
misc: 8
water: 8
villagers: 24
flying-monsters: 48
Lower values mean entities further from players are "frozen" and stop consuming CPU.
4. Pre-Generate Your World
Chunk generation is expensive. Pre-generating the world eliminates lag spikes when players explore new areas.
Install Chunky and run:
chunky radius 5000
chunky start
This pre-generates a 5000-block radius around spawn. Let it finish before opening the server to players.
Paper-Specific Tuning
Paper servers have additional config files with performance options.
paper-world-defaults.yml
Key settings to adjust:
chunks:
max-auto-save-chunks-per-tick: 8
prevent-moving-into-unloaded-chunks: true
entities:
armor-stands:
tick: false
spawning:
despawn-ranges:
monster:
soft: 28
hard: 96
paper-global.yml
chunk-system:
gen-parallelism: default
io-threads: -1
Leave these at defaults unless you know your plan's CPU allocation.
Use Aikar's JVM Flags
Aikar's flags are a well-known set of JVM garbage collection settings optimized for Minecraft servers. They reduce GC pause spikes that cause lag.
In the Startup tab of the control panel, set the following JVM flags (if not already configured):
-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
On 3LifeHosting.com servers, Aikar's flags are typically pre-configured. Check your Startup tab to confirm.
Why More RAM Won't Fix Lag
A common misconception is that adding more RAM fixes performance problems. In most cases, it doesn't — and can make things worse.
RAM handles world data, entity storage, and plugin/mod data. It does not handle:
- Game logic, mob AI, redstone — these are CPU-bound
- Chunk loading speed — this is disk I/O
- Network lag — this is bandwidth and routing
Allocating too much RAM forces Java's garbage collector to manage a larger heap, which causes longer GC pauses — the exact lag spikes you're trying to avoid.
Recommended maximums:
| Server Type | RAM |
|---|---|
| Vanilla (1–20 players) | 2–4 GB |
| Plugin-based (Paper/Spigot) | 4–6 GB |
| Modded (Forge/Fabric) | 6–8 GB |
| Heavy modpacks (200+ mods) | 10–12 GB |
If you've allocated within these ranges and still have lag, the bottleneck is almost certainly CPU or configuration — not RAM. See the tuning sections above, and use spark to profile what's actually consuming tick time.
Plugin Audit
Too many plugins — or poorly coded ones — cause lag. To find the worst offenders:
- Install spark (a profiling plugin)
- Run
/spark profiler start— let it run for a few minutes during normal play - Run
/spark profiler stop— it generates a report link - Look at the hot threads section for plugins consuming the most tick time
Remove or replace plugins that appear at the top.
When to Upgrade Your Plan
If you've tuned everything and TPS still drops below 18 during normal play, your server likely needs more resources. Common signs:
- TPS drops during peak player counts
- Console shows "Can't keep up!" warnings
- World save takes longer than a few seconds
Consider upgrading to a plan with more RAM or CPU allocation.
