TABI CLOUD
Minecraft

Aikar's Flags: Java Startup Options for a Smoother Minecraft Server

6 min read · Updated October 2026 · By Tabi Cloud

Aikar's flags are a set of Java options tuned for the G1 garbage collector. They are widely used on Paper servers to reduce lag spikes caused by garbage collection. They help most on plugin servers with a moderate amount of RAM.

The flags

These are the commonly published flags for heaps under about 12 GB. Replace 6G with your memory:

java -Xms6G -Xmx6G -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=true -jar server.jar --nogui

For very large heaps, the author publishes different values, so check the official page before copying.

Memory tips

Apply them on a panel

  1. Check the Startup tab of your server. Some servers have a field for extra Java flags, and others have a full startup command.
  2. Paste the flags, keeping the memory value linked to the panel variable if there is one.
  3. Make sure the jar name matches your server file.
  4. Restart and read the console for errors.

Ask us on Discord if you cannot find the setting.

Limits

Flags do not fix everything. Heavy plugins, too many loaded chunks and high view distance are more common causes of lag. Lower view-distance and simulation-distance first, then try flags.

Troubleshooting

Want your own server? Join our Discord and tell us the game. We set it up and send you the details. Need help with an error from this guide? Open a ticket there.

GET STARTED ON DISCORD

More guides

MinecraftHow to make a Minecraft server in 5 stepsMinecraftVanilla, Paper, Fabric or Forge: which Minecraft server type should you pick?MinecraftHow to install plugins on a Minecraft server