Aikar's Flags are a popular set of pre-tuned JVM (Java Virtual Machine) flags created by Aikar to improve Minecraft server performance and reduce garbage collection pauses.
By optimizing how Java manages memory, these flags can significantly reduce lag spikes and create a smoother experience without touching server's game settings.
These flags were created by Aikar (a PaperMC developer) specifically to tune the G1 Garbage Collector (G1GC) for Minecraft's unique memory patterns. They control things like how often garbage collection runs, how long it's allowed to pause the server, and how memory is allocated across different generations.
Aikar’s Flags are mainly used on Paper servers and the official Paper docs recommend these flags as the baseline JVM config for most Paper servers.
Your server is constantly loading chunks, spawning mobs, saving player data and running plugins. All of that uses memory (RAM).
Over time, that memory fills up with stuff the server doesn't need anymore: old chunks, dead or removed entities, expired effects.

Java has a built-in "cleaner" that goes through and throws this junk away. That cleaner is called the Garbage Collector (GC).
When the GC is cleaning, it basically says: “Everybody stop for a second while I clean this mess up.”
Big cleanups = noticeable lag spikes.

Once that quick cleanup is done your server has now more free RAM. If Java never cleaned up old stuff, your RAM would just fill up until TPS tanks, JVM throws an "Out of Memory" error and then server crashes.

By default, Java's garbage collector isn't optimized for Minecraft servers, which can cause noticeable lag spikes during the pauses and that's where Aikar's Flags come in.
Aikar’s Flags are a bunch of advanced startup settings for Java that tell this cleaner how to work so it doesn’t ruin your gameplay.
Aikar Flags:

The result is smoother gameplay with fewer noticeable lag spikes, especially during intensive operations like chunk generation or entity-heavy farms.
Aikar’s Flags aren’t a magic /fixlag button. They only tune how Java cleans up memory, they don’t:
Aikar’s Flags are like giving Java’s “cleaning lady” better instructions so she tidies the server quietly in the background instead of walking in, turning on all the lights, and making everyone stop while she vacuums.
Here's what some of the most important flags do:
| Flag | Description |
|---|---|
-XX:+UseG1GC |
Tells Java to use the G1 garbage collector, which is much better for Minecraft servers than the default one. |
-XX:MaxGCPauseMillis=200 |
Asks Java to keep cleanup pauses under 200 ms. That’s short enough that most players barely feel it as a tiny stutter instead of a full freeze. |
-XX:+DisableExplicitGC |
Stops badly coded plugins from forcing their own big cleanups at terrible times. It’s like telling plugins: “You don’t get to slam the pause button whenever you want.” |
-XX:+AlwaysPreTouch |
Fully prepares the server’s RAM when it starts, instead of slowly grabbing bits of it later. Startup might take a bit longer, but gameplay is more stable |
-XX:+ParallelRefProcEnabled |
Lets Java do part of the cleanup work on multiple CPU cores at once, so garbage collection finishes faster and causes shorter pauses. |
Most modern hosting providers (including WiseHosting) apply Aikar Flags by default. If you need to apply them manually:
CYBER DEAL
UP TO -40%
Host a Minecraft Server today with the best Cyber deal discount