Skip to main content

Aikar's Flags

As a measure to keep up with the requirements of Modern Minecraft, all Minecraft packages with 8GB of ram or higher will receive Aikar’s flags and the recommended 1.5GB of overhead ram by default. Any plan lower than 8GB will need to request to have Aikar’s flags added (if desired) and will need to have their Xmx value decreased by 1GB to provide the overhead required by modern versions of Java and Minecraft.

confirmation

If you’d like to request, or make sure, that your server is running on Aikar’s flags, make sure to open a ticket with on Discord!

What is Overhead

Each server is given a hard limit on how much ram it can use, and your server will utilize as much as it can. But Minecraft isn’t the only thing running when you start a Minecraft server, there’s a program called the Java Runtime Environment (or JRE) that interprets the code that Minecraft is written in and does a lot of the work for managing it’s resources behind the scenes. It’s required to have the JRE running to launch the server jar and if it stalls then the servers performance will also suffer or may even crash.

This is a common issue in nearly every type of computing task, and the resulting measurement is called overhead. Resource Overhead is an amount of resources that need to be set aside for other tasks to ensure that they aren’t used by another “greedy” task. In this case, our “greedy” task is the Minecraft Server, and it will starve the JRE unless we set aside some of the RAM specifically for the JRE.

If the JRE stops running then the Minecraft Server slows down and will eventually crash, so we use Aikar’s flags to balance out the tug-of-war between the Minecraft Server and the JRE and give us an estimate of what the Overhead should be. So we can provide 1.5GBof overhead for plans that are likely to require it.

Why has this changed with modern versions?

Recent versions of Minecraft have been going through major refactors to leverage the newer versions of the Java Language with the hope of providing more stable performance as Mojang adds more features. In the 1.13 update, we saw how poorly the game handled the kinds of features we have now when almost every server was crippled regardless of size, so most of us can say it’s working despite a few (well meaning) jabs now and then.

The language features they’re aiming to leverage rely heavily on the use of Garbage Collection, or at least that’s one of the issues that Aikar’s flags helps to solve. Garbage Collection, to put it simply, is a repeating task that clears out data that is no longer needed from RAM. But that takes CPU cycles and some RAM of it’s own, so we have to choose the most efficient way of doing that.

The default way the game works tends to result in Out Of Memory (OOM) errors quite a bit when the JRE doesn’t get the resources it needs to do the Garbage Collection task fast enough. As the servers RAM usage gets higher, the JRE runs out of RAM to perform Garbage Collection. That’s an incredible over simplification, but it should hopefully get the idea across.

Aikars flags uses a multitude of “flags” to change how the JRE behaves. These flags are designed to make Minecraft’s Garbage Collection as efficient and stable as possible while constraining the JRE to a known resource limit. These flags are the result of “a ton of effort” by their creator, and since publication have been tested by an untold amount of people all over the Minecraft community. For more information about Aikar’s flags, we’ve linked the Paper Docs website every time Aikar’s flags has been mentioned but here it is again ♥

Reach Out!

Have Questions? Need Help? Feel free to reach out!

Join our Discord