Skip to content
Hosting · Server setup

Aikar flags: are they needed

What the famous Aikar flags do for the G1 garbage collector, who they benefit, and why there will be no difference on a small server.

Updated August 13, 2026

Aikar's flags are a set of G1GC parameters tuned for Minecraft servers. Their goal is not to speed up the server, but to make garbage collector pauses short and predictable.

What they change

  • Increase the share of the heap allocated to the young generation (G1NewSizePercent) — most garbage in Minecraft is short-lived.
  • Set a pause target of around 200 ms (MaxGCPauseMillis).
  • Disable aggressive compaction and tune the region size for a large heap.

When they have an effect

SituationEffect
Heap 8 GB or more, active onlineNoticeable: long freezes are less frequent
ModpackNoticeable
Heap 2–4 GB, 5 playersVirtually none
The problem is not GC but a pluginNone

Before changing the flags, make sure the freezes are actually related to the garbage collector: in the Paper log you can see Can't keep up, and in the Spark report, the GC share — Profiling, Garbage collector and pauses.

In Millida

The control panel already starts the server with G1 tuned to the plan's memory size. You don't need to copy flags from third-party guides separately: some of them are designed for Java 8, and on Java 21 they are either ignored or cause problems.

If you know what you're doing, the startup parameters are editable — Startup parameters. There's one rule: change them one at a time and measure, don't apply a “package from the forum”.

Minecraft hostingYour server runs while you are offlineCreate server