Minecraft Server RAM & Aikar's / ZGC Startup Flags Calculator
Estimate recommended RAM and CPU threads for Paper, Purpur, Velocity, Fabric, or Forge servers and generate optimized Aikar's G1GC or Java 21 ZGC startup scripts.
Server Workload Profile
Generated Startup ScriptsPAPER • AIKAR
#!/usr/bin/env bash while true; do java -Xms5222M -Xmx5222M -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 server.jar nogui echo "Restarting in 5s... Press Ctrl+C to stop." sleep 5 done
- Set container/VPS RAM to 6 GB while assigning 5222 MB to Java -Xmx to leave OS/Netty headroom.
Frequently Asked Questions
Why should Java -Xmx be slightly lower than my total VPS RAM?
Leaving ~15% overhead outside -Xmx prevents Linux OOM-killer crashes caused by JVM native/Netty buffers, operating system caches, and plugins.
Should I use Aikar's Flags or Generational ZGC?
Use Aikar's G1GC flags for Java 17–21 compatibility across hosts, or Generational ZGC (-XX:+UseZGC -XX:+ZGenerational) on Java 21+ for ultra-low GC pause spikes on larger survival servers.
More Minecraft Tools
All ToolsGenerate secure NuVotifier v2 shared tokens in your browser along with ready-to-paste config.yml, VotingPlugin VoteSites.yml, and SuperbVote reward snippets.
Validate Paper, Spigot, VotingPlugin, LuckPerms, EssentialsX, and Velocity YAML files for forbidden tabs, odd indentation, missing colons, and unclosed quotes.
Ping any Minecraft Java server live to check online status, current players, MOTD, version, SRV target, and response latency.
