Intermediate 20 min — Tune server.properties, Paper config, and JVM flags for maximum TPS.
Before optimizing, measure:
/tps/mspt/spark profiler to find what's slowIf TPS is below 18 consistently, you have performance issues.
view-distance=8 — reduce from default 10 (major impact)simulation-distance=6 — how far entities are activemax-tick-time=-1 — prevents watchdog crashes during lag spikesnetwork-compression-threshold=256 — reduces network overheadEdit config/paper-global.yml and paper-world-defaults.yml:
max-auto-save-chunks-per-tick: 8 — spread save loadentity-per-chunk-save-limit — cap entities saved per chunkdespawn-ranges.soft: 28, hard: 80 — mob cleanup rangemax-entity-collisions: 2 — reduces collision calculationsdisable-chest-cat-detection: true — minor but freeUse Aikar's recommended flags:
java -Xms4G -Xmx4G \
-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 \
-jar paper.jar
Set -Xms and -Xmx to the SAME value. Don't allocate more than your machine has available minus 1-2GB for OS.
Install the Chunky plugin and pre-generate your world:
/chunky radius 5000
/chunky start
This eliminates lag from generating new chunks while players explore. Let it run when the server is empty.
/spark tps to identify entity-heavy chunksper-player-mob-spawns: true in Paper configIf you've optimized everything and TPS is still low:
Desert Forge hosting starts at $2/week — instant setup, DDoS protection, free tier available.
Get a serverBrowser-based utilities for self-hosters and developers. No signup, no upload.