HomeDownloadsJoin Discord

Optimizing Your Minecraft Server with Aikar Java Flags

By Paul
Published in Configuration
May 26, 2021
1 min read

One of the common questions when starting a server is “What flags should I be using to launch my Minecraft server?” There’s a lot of incorrect information spread about what flags make your Minecraft server run fastest, so read on to find out what flags you need!

Aikar Flags

If you’ve seen recommendations for flags, you’ve been recommended Aikar Flags. The reason these are highly recommended are because they’ve been tested better than any other set of flags. Aikar flags have been carefully tuned over years based off data from a lot of servers, providing the smoothest experience for your server.

Why Flags Even Matter

The startup flags basically tell Java what options it should use when running the software. Most of the flags that are important to running a server smoothly relate to how Java does Garbage Collection, which basically cleans up the Memory it’s using so it can run faster. When there’s a lot of garbage, Garbage Collection can take a long time and cause big lag spikes. A good set of flags (like Aikar Flags) will optimize this Garbage Collection so that it doesn’t lag the server, running quickly and as infrequently as possible.

How To Use the Flags

If you’d like to read Aikar’s original article on the flags, you can read it here. However, to make it easier to use the flags we’ve created a tool to create the exact flags you need for your Minecraft server! Just fill in your server details, and we’ll give you the command.




java -Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar nogui

Finish

Once you copy your personalized Aikar Flags, use them to launch your Minecraft server, and you’ll immediately start getting the best performance out of your Garbage Collection. In the future, Minecraft Servers might switch to the ZGC Garbage Collector, which is a new super fast option for servers using a lot of memory. But for now, these flags do a great job and run so well that it’s difficult to find a reason to switch to something unstable like ZGC.


Tags

#bukkit#paper#airplane#optimization#flags#jvm#configuration
Previous Article
Mojang Cutting Off Blacklisted Servers - Airplane Newsletter for March 2021

Paul

Lead Developer

Topics

Airplane
Configuration

Related Posts

Top 10 Things You Missed Optimizing Your Minecraft Survival Server (that work with 1.16)
March 04, 2021
4 min
© Technove LLC 2021, All Rights Reserved.

Legal Stuff

Privacy NoticeCookie PolicyTerms Of Use

Social Media