Desert Forge IT — Arizona IT · Field-tested tools & guidesFree consult →

Minecraft Server Optimization Guide

Intermediate 20 min — Tune server.properties, Paper config, and JVM flags for maximum TPS.

Measuring Performance

Before optimizing, measure:

  • TPS — Ticks Per Second, should be 20.0. Use /tps
  • MSPT — Milliseconds Per Tick, should be under 50. Use /mspt
  • Spark profiler — install the Spark plugin, run /spark profiler to find what's slow

If TPS is below 18 consistently, you have performance issues.

server.properties Tuning

  • view-distance=8 — reduce from default 10 (major impact)
  • simulation-distance=6 — how far entities are active
  • max-tick-time=-1 — prevents watchdog crashes during lag spikes
  • network-compression-threshold=256 — reduces network overhead

Paper Configuration

Edit config/paper-global.yml and paper-world-defaults.yml:

  • max-auto-save-chunks-per-tick: 8 — spread save load
  • entity-per-chunk-save-limit — cap entities saved per chunk
  • despawn-ranges.soft: 28, hard: 80 — mob cleanup range
  • max-entity-collisions: 2 — reduces collision calculations
  • disable-chest-cat-detection: true — minor but free

JVM Flags (Aikar's)

Use 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.

Pre-generating Chunks

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.

Entity Optimization

  • Limit mob farms to reasonable sizes
  • Use /spark tps to identify entity-heavy chunks
  • Consider per-player-mob-spawns: true in Paper config
  • Villager pathfinding is expensive — limit villager count
  • Clear ground items regularly

When to Upgrade Hardware

If you've optimized everything and TPS is still low:

  • More RAM won't help if CPU is the bottleneck
  • Minecraft is primarily single-threaded — clock speed > core count
  • SSD is essential for chunk loading
  • For 20+ players: 5GHz+ CPU, 8GB+ dedicated RAM, NVMe SSD
Play with friends?

Desert Forge hosting starts at $2/week — instant setup, DDoS protection, free tier available.

Get a server

← Back to Knowledge Base

DF: Game Hosting

Skip the setup. Game servers from $2/week with instant deployment.

Get a server