New to CraftNodes? Use code WELCOME10 at checkout for 10% off your first month.

Back to Blog

May 13, 2026

Minecraft Server Startup Flags: Optimize with Aikar Flags

Optimize your Minecraft server with Aikar JVM startup flags. Reduce lag spikes from garbage collection and improve overall server performance.


What Are JVM Flags?

Minecraft servers run on the Java Virtual Machine (JVM). JVM flags control how Java manages memory. The most impactful setting is the garbage collector — which clears unused memory. Poor GC configuration causes lag spikes.

The Aikar Flags

Aikar's G1GC flags are the community standard for Minecraft servers. They tune Java's G1 Garbage Collector to minimize pause times. CraftNodes applies these flags by default.

-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

Setting Xms and Xmx

Set both -Xms and -Xmx to the same value — your available RAM minus system overhead. For a 4GB plan, use -Xms3500M -Xmx3500M.

CraftNodes pre-configures these flags so you do not need to set them manually on new servers.


All posts

CraftNodes Blog