MC ToolboxMC TOOLBOX

April 16, 2026

Ultimate Minecraft Server Optimization: Aikar Flags & Paper Tuning

Fix server TPS lag spikes with optimal Aikar JVM startup flags, Paper.yml entity tick limits, and chunk loading settings.

Running a smooth Minecraft server with 20+ players requires careful Java Virtual Machine (JVM) tuning and server configuration. Default Paper or Spigot settings tick too many entities and waste RAM on unoptimized Garbage Collection.

Recommended Aikar JVM Startup Flags

Copy these optimized G1GC flags into your server start script (adjust RAM to match your server, e.g., 6G - 10G):

Minecraft server console showing 20.0 TPS and G1GC garbage collection performance
Screenshot from the matching MC Toolbox tool.
java -Xms8G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=15 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 --add-modules=jdk.incubator.vector -jar paper.jar nogui

Paper.yml Key Optimization Settings

  • max-auto-save-chunks-per-tick: Set to 6 (reduces disk I/O lag).
  • despawn-ranges.soft: Set to 28 / hard: Set to 96.
  • entity-activation-range: Reduce tick ranges for passive animals and villager pathfinding.

Generate custom Windows (.bat) and Linux (.sh) start scripts with tuned flags using our Server Start Script Generator!

Gio Nui

Gio Nui

I'm an independent developer and long-time Minecraft creator. Since 2011, I've been focused on building high-performance, browser-based tools for the community.

More Guides