Aikar's JVM Flags for Minecraft Servers Explained
What Aikar's flags are, why they improve Minecraft server performance, and how to apply them.
Aikar's flags are a set of JVM (Java Virtual Machine) arguments that optimize garbage collection for Minecraft servers. They're considered the gold standard for server performance.
What They Do
- Use the G1 garbage collector instead of Java's default
- Reduce lag spikes caused by garbage collection pauses
- Optimize memory allocation patterns specific to Minecraft's workload
- Prevent the JVM from giving unused memory back to the OS
Applying Aikar's Flags
Via the Startup Tab
- In the XGamingServer Panel, click Startup
- Look for a JVM Flags or Additional Java Arguments field
- Paste the flags below
- Restart your server
The Flags
For servers with 12GB RAM or less:
-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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=trueFor servers with more than 12GB RAM: Change these two values:
-XX:G1NewSizePercent=40
-XX:G1MaxNewSizePercent=50Do They Actually Help?
Yes — measurably. The biggest improvement is reducing TPS lag spikes caused by the JVM pausing to clean up memory. Without these flags, you'll see periodic stutters every few minutes.
Common Mistakes
- Don't over-allocate RAM — giving your server 16GB when it only needs 4GB makes GC pauses worse, not better
- Don't mix GC flags — use Aikar's flags OR other GC settings, not both
- Don't use
-XX:+UseConcMarkSweepGC— this is the old CMS collector that Aikar's flags specifically replace
Related Guides
How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server