Minecraft Server Optimization Guide (Reducing Lag & Fixing TPS)
A Minecraft server runs at a target rate of 20 TPS (Ticks Per Second). When a server drops below 19 TPS, players experience block delay, rubberbanding, and sluggish mob AI. This guide provides proven configuration tweaks to optimize your server without breaking gameplay mechanics.
/spark tps or /timings on (followed by /timings paste after 10 minutes) from your in-game chat or panel console to pinpoint whether entities, chunk generation, or redstone are causing lag.Step 1: Switch from Vanilla / Spigot to Paper or Purpur
Vanilla and standard Spigot lack modern asynchronous chunk loading and entity management. Upgrading your jar file is the single most effective way to restore 20 TPS.
- Log in to the Ash Host Game Panel and stop your server.
- Take a backup using the Backups tab.
- Go to the Startup tab and select Paper or Purpur as your server type.
- Start the server to generate modern configuration files.
Step 2: Optimize server.properties
Open the Files tab and edit server.properties:
| Setting | Recommended Value | Reason |
|---|---|---|
view-distance |
6 - 8 |
Reduces server-side chunk generation load significantly. |
simulation-distance |
4 - 5 |
Controls how far away entities tick without affecting visual chunk viewing. |
network-compression-threshold |
256 |
Balances CPU usage with bandwidth consumption. |
sync-chunk-writes |
false |
Enables asynchronous disk writing for player data and chunks. |
Step 3: Tune paper-world-defaults.yml (or paper.yml)
In modern Paper versions, world settings are located in config/paper-world-defaults.yml:
entities:
activation-range:
animals: 16
monsters: 24
raiders: 36
misc: 8
water: 12
villagers: 16
tick-inactive-villagers: false
spawns-per-world:
monster: 50
animal: 10
water_ambient: 5
chunks:
auto-save-interval: 6000
max-auto-save-chunks-per-tick: 8
tick-rates:
sensor:
villager:
secondarypoisensor: 40
behavior:
villager:
validatenextpoi: 40
Key optimizations applied:
tick-inactive-villagers: false: Stops the server from calculating pathfinding and trades for idle villagers when no players are nearby. Villagers are the #1 source of entity lag on SMP servers.activation-range: Reduces how far away mobs will actively calculate movements, reducing CPU cycles during peak player activity.
Step 4: Pre-Generate Your World
Generating new chunks on-the-fly while players explore with elytra or boats forces the server CPU to constantly read and write to disk, causing micro-stutters.
- Install the Chunky plugin from your panel's plugin manager or upload
Chunky.jarto the/pluginsfolder. - Set a world border radius (e.g., 5,000 blocks):
/chunky radius 5000 - Start pre-generation during low-traffic hours:
/chunky start
Once finished, all chunks inside the border are stored on disk, eliminating chunk generation lag permanently.
Step 5: Memory Allocation & Aikar's Flags
Ash Host Minecraft servers run with optimized garbage collection flags (Aikar's Flags) enabled by default. This prevents Java "stop-the-world" memory pauses that cause sudden freeze frames.
Was this answer helpful?
Related Articles
Powered by WHMCompleteSolution