Skip to content

Minecraft Aikar's flags generator

Pick the heap size you want Java to use and get Aikar's flags, ready to paste into your startup command or download as a script for Linux or Windows. Works for any Paper, Spigot, Purpur, Fabric or Forge server, not just ours.

Heap size
GB
Leave about 1 to 1.5 GB of your plan's RAM for the OS and container, the way our own servers size the heap automatically. A 6 GB plan runs well with a 4.5 to 5 GB heap here.
Server jar file name
GUI window
Startup command

Standard preset: this switches to the large-heap tuning automatically at 12 GB. Xms is set equal to Xmx, 30% new-gen sizing.

java -Xms6144M -Xmx6144M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -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=true -Dterminal.jline=false -Dterminal.ansi=true -jar server.jar nogui

What these flags do

Aikar's flags retune the G1 garbage collector's region size and thresholds for the way Minecraft allocates memory: lots of short-lived objects with occasional big spikes when chunks or entities load. The result is shorter, more frequent pauses instead of the multi-second freeze a default JVM eventually hits.

They are not free insurance on a tiny server: below about 4 GB of heap there is not enough room for the tuning to do anything, so a plain -Xmx line does just as well.

Every Play Your Way Minecraft server launches with these flags and a heap sized to your plan automatically, so there is nothing to paste in.

FAQ