How to Optimize Minecraft Paper/Folia Server
A comprehensive detailed guide (based on Paper Chan's famous guide) to optimizing your Minecraft server. Understand the inner workings of your server instead of just blindly applying values.
There is no "one size fits all" configuration. The values provided here are examples and baselines. You should understand what each option does and tweak it to fit your server's specific hardware and player base.
1. Pre-generate Your Map
Generating terrain is one of the most CPU-intensive tasks. Pre-generating your world before players join is the single most effective step to prevent lag on a new server.
Use the Chunky plugin. It's robust and simple.
chunky radius 5000chunky startSet a reasonable border (e.g., 5,000 - 10,000 blocks). Expanding too far increases disk usage exponentially.
2. View & Simulation Distance
Found in server.properties (can be overridden in spigot.yml).
Simulation Distance
Determines how far away from the player the world is "active" (ticking entities, growing crops).Default: 10. Lowering this to 5 or 6 massively reduces CPU load with minimal gameplay impact.
View Distance
Determines how many chunks are sent to the player to see. This affects RAM and Network usage more than CPU. Keep this reasonable (7-10) for most servers.
spawn-limits
Controls the max number of entities globally per player.
| monsters | 20-30 |
| animals | 5-8 |
| water-animals | 2-5 |
| water-ambient | 2-5 |
| ambient | 1-2 |
Note: Vanilla defaults (70 monsters) are overkill for multiplayer. A value of 30 feels very similar but saves huge resources.
mob-spawn-range
How far (in chunks) mobs spawn from the player. Set this to Simulation Distance - 1.
Example: If sim-distance is 6, set this to 5.
entity-activation-range
Controls how close an entity needs to be to tick actively.
monsters: 24
raiders: 48
misc: 8
tick-inactive-villagers: false
merge-radius
Merging dropped items reduces entity count.
exp: 4.0
This file is located in your config/ folder (for newer Paper versions).
max-entity-collisions
Default: 8. Set to 2 or 3.
Prevents lag when too many mobs are crammed in one spot (like farms).
despawn-ranges
Adjust hard/soft despawn ranges to match your Simulation Distance.
Soft: 28, Hard: 96 (for sim-distance 6).
per-player-mob-spawns
Set to true.
Ensures mob caps are calculated per player, distributing mobs more fairly and improving performance.
optimize-explosions
Set to true.
Uses a faster algorithm for TNT explosions.
Java Startup Flags (Aikar's Flags)
Your specialized flags are critical for garbage collection performance. Do not just allocate RAM; use Aikar's flags.
Do not allocate 100% of your machine's memory to Minecraft. Leave some for the OS. Set Xms and Xmx to the same value to prevent heap resizing lag.
This guide is heavily based on Paper Chan's Little Guide to Minecraft Server Optimization. We highly recommend reading the original guide for even deeper technical insights and updates.
Bonus: Use SyncBoost Plugin
For an even easier optimization experience, consider using SyncBoost — our all-in-one performance enhancement plugin designed specifically for Paper/Folia servers.