Aikar's flags (searched as aikar flags) are a set of Java start options that tune the G1 garbage collector for Paper servers on Java Edition. PaperMC's docs publish them, but its start script generator says to try no flags first on a modern JVM (17, 21 or higher) and to reach for them when garbage collection causes problems.
This page is based on PaperMC's documentation, read on 24 October 2026. We did not run a server, benchmark the flags or measure any pause time.
What Aikar's flags are
They are one long Java command. PaperMC's Aikar's flags page lists it as `java -Xms10G -Xmx10G -XX:+UseG1GC ... -jar paper.jar --nogui`. Everything between `java` and `-jar` is a JVM flag: memory sizes (`-Xms`, `-Xmx`), garbage collector settings (`-XX:`) and two `-D` system properties, `-Dusing.aikars.flags=https://mcflags.emc.gs` and `-Daikars.new.flags=true`. `--nogui` comes after the file name and is a Paper CLI argument, a different kind of option.
What the flags change
The docs' reasoning starts with allocation. They say Minecraft allocates memory at a rate of at least 800MB/second on a 30 player server, mostly short-lived objects such as block positions. With G1's default of 5% for the new generation, they say young collections would run 1 to 2 or more times per second and TPS could suffer. The flags give the new generation more room and change how long data survives before promotion.
| Flag | Default per the docs | Aikar's value |
|---|---|---|
| G1NewSizePercent / G1MaxNewSizePercent | 5% for new generation | 30 and 40 |
| G1ReservePercent | 10 | 20 |
| G1MixedGCCountTarget | 8 | 4 |
| G1MixedGCLiveThresholdPercent | 65 to 85, depending on Java | 90 |
| G1RSetUpdatingPauseTimePercent | 10 | 5 |
| G1HeapRegionSize | auto calculated | 8M |
| MaxGCPauseMillis | a pause-time goal | 200 (a goal, not a cap) |
- `-XX:MaxTenuringThreshold=1` stops short-lived data being promoted to the old generation, and the docs say it greatly reduces young collection pauses.
- `-XX:+DisableExplicitGC` stops plugins from forcing a full garbage collection, which the docs describe as a cause of massive lag spikes.
- `-XX:+AlwaysPreTouch` reserves memory at process start, and the docs call it mandatory for Transparent Huge Pages.
Memory matters too. The docs suggest at least 6 to 10GB, set `-Xms` equal to `-Xmx`, and warn that 32GB of RAM for a server gives minimal returns. For sizing by player count, see how much RAM a Minecraft Java server needs.
When Paper's docs say to use them
PaperMC's start script generator is blunt. If you run a modern JVM, 17, 21 or higher, it says to try with no flags first, because modern JVMs handle default garbage collection settings well. It says to try Aikar's flags if you have GC problems or run an older Minecraft or Java. Which Java a release needs is covered in what Java each Minecraft release needs.
What this means for a plugin server
The flag with the most direct plugin link is `-XX:+DisableExplicitGC`. The docs say some plugins try to control memory by invoking garbage collection, and this flag blocks those calls. If you run a Paper plugin stack, the Paper plugin listing shows what we list, and Paper vs Spigot vs Purpur covers the server software itself.
What Aikar's flags do not fix
The docs frame them as garbage collection tuning and nothing wider. The 200 millisecond figure is a goal, and the docs say it will not make every collection 200. They also say more memory stops helping past a point. Nothing in them covers plugin load, chunk generation or other causes of a low TPS, so start with what TPS means in Minecraft if that is your symptom.
If you still see old generation problems with the flags, the docs suggest turning on GC logging. For Java 11 and newer that is `-Xlog:gc*:logs/gc.log:time,uptime:filecount=5,filesize=1M`, which the docs say does not hurt performance and uses about 5MB. They also say they have not measured Transparent Huge Pages (`-XX:+UseTransparentHugePages`) for Minecraft, so that section is for people who want to experiment.
How to add them to a start script
PaperMC's generator outputs a start script with a choice of None, Aikar's or Velocity flags, and the system properties page says `-D` options go in the `.bat` or `.sh` file you already use. With no flags the generator's sample is `java -Xms4096M -Xmx4096M -jar server.jar --nogui`. For adding plugins once the server runs, see how to install plugins on a Minecraft server.




