How to Optimize Your Minecraft Server Performance
Complete Minecraft server optimization guide covering TPS, MSPT, server.properties, Paper, Spigot, and bukkit.yml tuning, Spark profiler, and pre-generation.
Lag on a Minecraft server can come from many sources — unoptimized settings, too many loaded chunks, entity overload, or running default Vanilla software. This guide covers every optimization layer, from basic settings to advanced config tuning.
Understanding TPS and MSPT
Before optimizing, you need to know how to measure performance.
TPS (Ticks Per Second)
Minecraft runs a game loop at 20 ticks per second. Every tick processes mob AI, block updates, redstone, player actions, and more. When the server can't keep up, TPS drops and the game slows down.
| TPS | Server Health |
|---|---|
| 20.0 | Perfect — no lag |
| 18–19.9 | Minor lag, mostly unnoticeable |
| 15–17.9 | Noticeable lag — mobs stutter, blocks delay |
| 10–14.9 | Severe lag |
| Below 10 | Unplayable |
MSPT (Milliseconds Per Tick)
MSPT measures how long each tick takes to process. To maintain 20 TPS, each tick must complete within 50ms (1000ms ÷ 20 = 50ms).
MSPT is more useful than TPS for early detection — a server at 20 TPS but 48ms MSPT is about to fall behind.
| MSPT | Status |
|---|---|
| 0–35ms | Healthy |
| 35–50ms | Warning — approaching limit |
| 50ms+ | Overloaded — TPS dropping |
How to Check
- Paper/Spigot: Run
/tpsin-game or the console. Shows 1-min, 5-min, and 15-min averages. - Paper only: Run
/msptfor milliseconds per tick. - Spark: Run
/spark tpsfor TPS, MSPT (min/median/95th/max), and CPU usage.
Daily Restarts
The single best thing you can do for stability. Java accumulates memory fragmentation over time, and restarts give the server a fresh start.
Set up a daily restart using Schedules on the XGamingServer panel. For busy servers (20+ players), consider restarting every 12 hours.
Optimizing server.properties
The most impactful vanilla settings. See Configure Your Server for the full reference.
Stop your server
Access the XGamingServer panel and stop your Minecraft server.
Open server.properties
Go to Files and open server.properties.
Update these settings
sync-chunk-writes=false
view-distance=8
simulation-distance=6Save and start
Click Save and start your server.
Recommended Values by Player Count
| Player Count | simulation-distance | view-distance |
|---|---|---|
| 1–5 | 8 | 10–14 |
| 6–10 | 6 | 8–10 |
| 10–20 | 5 | 5–7 |
| 20+ | 3–4 | 5 |
💡 Tip: Lowering server view distance doesn't have to hurt the player experience. Players can install client-side mods like Distant Horizons or Bobby to render terrain beyond the server's view distance.
Other Useful server.properties Tweaks
| Setting | Recommended | Why |
|---|---|---|
sync-chunk-writes | false | Prevents I/O bottleneck on chunk saves |
entity-broadcast-range-percentage | 75–100 | Reduces entity packets sent to clients |
pause-when-empty-seconds | 60 | Pauses the server when no players are online (1.21.2+) |
Enable Aikar's Flags
Aikar's Flags are optimized JVM settings that improve garbage collection and reduce lag spikes. On XGamingServer, enable them from Startup — it's a single toggle.
Pick the Right Server Software
Running the official Vanilla server from Mojang is one of the most common causes of poor performance. Optimized server software makes a huge difference.
- Paper — Best choice for most servers. Supports plugins, includes major performance optimizations, and bundles Spark profiler (1.21+).
- Fabric — Lightweight mod loader. Requires performance mods like Lithium to match Paper's optimization.
📝 Note: To change software, see Changing Versions. Do not change if you're running a pre-configured modpack.
Paper Configuration Tuning
Paper uses multiple config files layered on top of server.properties. Each layer adds more granular control.
Config File Hierarchy
| File | Scope | Purpose |
|---|---|---|
server.properties | Server-wide | Vanilla Minecraft settings |
bukkit.yml | Server-wide | Mob spawn limits, tick rates |
spigot.yml | Per-world | Entity activation ranges, merge radius, tracking |
config/paper-global.yml | Server-wide | Chunk loading, networking |
config/paper-world-defaults.yml | Per-world defaults | Entity despawning, tick rates, redstone |
bukkit.yml — Mob Spawn Limits
The spawn-limits section controls how many mobs can exist. Lowering these is one of the biggest performance wins.
spawn-limits:
monsters: 50
animals: 8
water-animals: 3
water-ambient: 10
water-underground-creature: 3
axolotls: 3
ambient: 1| Setting | Default | Recommended | Notes |
|---|---|---|---|
monsters | 70 | 35–50 | Biggest performance impact. 50 is a good balance |
animals | 10 | 5–8 | Rarely need the full cap |
water-animals | 5 | 3 | Dolphins, squid |
water-ambient | 20 | 10 | Fish — cosmetic only |
ambient | 15 | 0–1 | Bats — no gameplay function, safe to disable |
spigot.yml — Entity Activation Ranges
Entities outside their activation range skip most AI processing. This is how Paper/Spigot handles thousands of entities efficiently.
world-settings:
default:
entity-activation-range:
animals: 24
monsters: 32
raiders: 48
misc: 12
water: 12
villagers: 24
flying-monsters: 32
entity-tracking-range:
players: 48
animals: 48
monsters: 48
misc: 32
other: 64
merge-radius:
item: 3.5
exp: 4.0
tick-inactive-villagers: false
nerf-spawner-mobs: true
item-despawn-rate: 4000Key changes from defaults:
| Setting | Default | Recommended | Why |
|---|---|---|---|
entity-activation-range.animals | 32 | 24 | Animals don't need full range |
entity-activation-range.misc | 16 | 12 | Item frames, armor stands |
entity-activation-range.villagers | 32 | 24 | Reduce expensive villager AI |
merge-radius.item | 2.5 | 3.5 | Merge more ground items together |
merge-radius.exp | 3.0 | 4.0 | Merge more XP orbs |
tick-inactive-villagers | true | false | Don't tick villagers outside activation range |
nerf-spawner-mobs | false | true | Remove AI from spawner mobs |
item-despawn-rate | 6000 | 4000 | Clean up ground items faster (ticks) |
paper-world-defaults.yml — Advanced Tuning
chunks:
max-auto-save-chunks-per-tick: 12
delay-chunk-unloads-by: 10s
prevent-moving-into-unloaded-chunks: true
entities:
spawning:
per-player-mob-spawns: true
despawn-ranges:
monster:
soft: 28
hard: 96
misc:
redstone-implementation: ALTERNATE_CURRENT
environment:
treasure-maps:
enabled: false
tick-rates:
behavior:
villager:
validatenearbypoi: 120
sensor:
villager:
secondarypoisensor: 240
collisions:
max-entity-collisions: 6| Setting | Default | Recommended | Why |
|---|---|---|---|
max-auto-save-chunks-per-tick | 24 | 12 | Spread autosave load across more ticks |
redstone-implementation | VANILLA | ALTERNATE_CURRENT | Significantly more efficient redstone processing |
treasure-maps.enabled | true | false | Treasure map searches cause major lag spikes |
per-player-mob-spawns | true | true | Distributes mob cap fairly across players |
max-entity-collisions | 8 | 6 | Reduce collision processing in mob farms |
Using the Spark Profiler
Spark is a performance profiler that identifies exactly what's causing lag. It comes bundled with Paper since 1.21+ — no installation needed. For other platforms, install it as a plugin/mod.
Quick Health Check
/spark tps
/spark health --uploadThis shows current TPS, MSPT, CPU usage, memory, and generates a shareable link.
Profile a Lag Spike
Start profiling
/spark profiler start --timeout 120Wait for the timeout
Play normally for 2 minutes while Spark collects data.
View results
Spark outputs a link. Open it to see a flame graph — the widest bars are what's consuming the most server time.
Profile Only Lag Spikes
/spark profiler start --only-ticks-over 70 --timeout 300This only records ticks that take longer than 70ms, filtering out normal operation. Run for 5 minutes during peak hours.
Other Useful Commands
| Command | Purpose |
|---|---|
/spark tps | Current TPS, MSPT, CPU |
/spark tickmonitor | Real-time tick duration alerts |
/spark gc | Garbage collection history |
/spark heapsummary | Memory usage by object type |
Pre-Generate Your World
New chunk generation is one of the biggest performance drains. Pre-generating chunks ahead of time means the server doesn't have to generate terrain on-the-fly as players explore.
Platform-Specific Performance Mods
For mod loader servers, install dedicated performance mods:
- Fabric Performance Guide — Lithium, Starlight, FerriteCore, and more
- Forge Performance Guide — Recommended mods for Forge
- NeoForge Performance Guide — Recommended mods for NeoForge
Quick Optimization Checklist
- Switch from Vanilla to Paper (biggest single improvement)
- Enable Aikar's Flags in
Startup - Set
sync-chunk-writes=falsein server.properties - Lower
view-distanceandsimulation-distancebased on player count - Reduce
spawn-limits.monstersto 50 in bukkit.yml - Set
tick-inactive-villagers: falsein spigot.yml - Set
redstone-implementation: ALTERNATE_CURRENTin paper-world-defaults.yml - Pre-generate your world
- Schedule daily restarts
- Use
/spark healthto identify remaining bottlenecks
Related Guides
See also: Configure Your Server | Aikar's Flags | Pre-Generate Chunks | Change View Distance | Fabric Performance Guide
If you need help, join our Discord.
How is this guide?

How to Optimize Your NeoForge Server Performance
Learn how to optimize your NeoForge Minecraft server with performance mods to reduce lag and increase TPS.
How to Use the Player Manager on Your Minecraft Server
Manage online players, operators, whitelist, bans, and player data using the built-in Player Manager in the XGamingServer panel.