Trouble with lag, low TPS, or choppy gameplay? This guide will help you optimize your server using ready-to-use config files, JVM flags, optimized forks, and profiling tools.
| Fork | Benefits |
|---|---|
| Purpur | Compatible with Paper, extra performance and config options. |
| Pufferfish | Lightweight fork with better mob handling, optimized ticking, and lower CPU usage. |
| Leaf | Minimal overhead and fast tick performance. |
Switching to one of these forks instantly improves server performance.
Use Spark Profiler to see what is causing lag:
/spark profiler start
/spark profiler stop
/spark profiler start --timeout 120
# it will stop spark after 2min
/spark profiler start --thread *
# it will give you all thread information - Check TPS, memory usage, and plugin impact.
- Identify entity overload or chunk generation lag.
The repo contains ready-to-use configs:
server.propertiesโ optimized view distance & simulation distancepaper-global.ymlโ server-wide Paper optimizationspaper-world.ymlโ per-world overridesspigot.ymlโ entity tracking and activation ranges- Other files โ tuned for best TPS
How to use:
- Download the config files (ZIP or direct).
- Copy them into your server directory.
- Restart the server.
No need to clone the repo unless you want version control updates โ just download the files and replace your old configs.
java -Xms{RAM}M -Xmx{RAM}M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -jar paper.jar --nogui{RAM}= RAM in MB- Keep
Xms=Xmxfor stable memory usage
Reduces memory spikes and GC lag, stabilizing TPS.
/chunky generate <radius> <center_x> <center_z>Reduces lag caused by on-the-fly chunk generation.
- Check plugin performance, entity overload, or chunk generation bottlenecks.
- Adjust settings in
paper-global.yml,paper-world.yml, orspigot.ymlbased on Spark reports.
- Keep server forks updated.
- Avoid excessive farms, mobs, and redstone.
- Backup server and configs before making changes.
- Combine optimized configs, JVM flags, chunk pre-generation, and Spark monitoring for best results.