DocsAikar flags and startup parameters
Ask on Discord
aikar-flags-and-startup-parameters illustrated for the CraftLands Minecraft docs
MINECRAFT · SETTING
lborg
Docs Writer
Published September 14, 2026
UPDATED TODAY

Aikar flags and startup parameters

What Aikar's JVM flags actually do, where to paste them in the panel, and when they help or hurt a Minecraft server.

QUICK ANSWER

Startup tab, JVM Arguments field. Paste the flag string below, then restart.

Fact
Aikar's flags are pure JVM garbage collector settings, not Minecraft or plugin specific, so they work the same on Vanilla, Spigot, Paper, or Purpur.

Aikar's Flags and Server Startup Parameters

This doc gives server owners the exact Aikar's flags string, where to paste it in Startup, and how to tell if it actually helped.

Before you start

These are JVM flags, not plugin settings, so they work on any jar: Vanilla, Spigot, Paper, Purpur. You'll need to restart, it only takes effect on the next boot. Swap <RAM> for your plan's memory in MB. A 4GB plan is 4096M.

Steps

  1. 1Copy this string:

-Xms<RAM>M -Xmx<RAM>M -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

  1. 2Replace both <RAM> values with your plan's RAM in megabytes.
  2. 3Log into the CraftLands panel, open your server, go to Startup.
  3. 4Paste the string into the JVM Arguments field. Don't include java, jar, or server.jar, the panel adds those on its own.
  4. 5Save, then restart the server.
startup.webp


What the main flags do

Xms and Xmx match on purpose, that's a fixed heap with no resize pauses. UseG1GC switches the collector to G1, built for short pauses on large heaps. MaxGCPauseMillis=200 sets a target pause time, not a guarantee. ParallelRefProcEnabled runs reference cleanup across threads instead of one. That matters for Minecraft's entity heavy allocation pattern. G1NewSizePercent, G1MaxNewSizePercent, and G1HeapRegionSize size the young generation and regions for that same pattern. AlwaysPreTouch and PerfDisableSharedMem trade a slightly slower boot for fewer stalls once it's running.

Under 4GB of RAM

Below 4GB, region and generation tuning doesn't really help, and it can even trigger more GC instead. Drop these:

G1NewSizePercent, G1MaxNewSizePercent, G1HeapRegionSize, G1ReservePercent, G1HeapWastePercent, G1MixedGCCountTarget, G1MixedGCLiveThresholdPercent, G1RSetUpdatingPauseTimePercent, SurvivorRatio, MaxTenuringThreshold.

Keep Xms, Xmx, UseG1GC, ParallelRefProcEnabled, MaxGCPauseMillis, UnlockExperimentalVMOptions, DisableExplicitGC, AlwaysPreTouch, and PerfDisableSharedMem.

Verify

Check the Console tab on boot, the flags print in the startup log before the world loads. Watch GC pauses for an hour with /timings or Spark. They should trend down.

If it doesn't work

Server won't start: the flags target a newer Java version than you're running. Match it on Startup. Crashes on boot with an allocation error: Xmx is set above your plan's RAM. Lower it to match. No real difference: lag is often chunk generation or plugins, not GC. Confirm with /timings before tuning further.

Do these flags boost FPS or TPS directly?

No, they only smooth out garbage collection pauses; actual lag from chunk generation or plugins needs its own fix.

Rent a Minecraft Server Today

Pick a plan and your Minecraft server is online in about 30 seconds, with Paper plugins and Forge modpacks one click away in the panel. Full file access and SFTP are there when you go deeper, and free automatic backups every six hours mean a restore, not a rebuild.
VIEW MINECRAFT PLANS
Logo
Game server hosting made simple for everyone.
CraftLands Hosting S.R.L.Calea Moșilor 88, Sc. F, Ap. F1, Sector 3, 030152, București, RomaniaCUI 50929471 · VAT RO51171749Reg. Com. J2024043623000+40 755 361 220business@craftlands.host
© 2024 - 2026 CraftLands Host. All rights reserved.
Soluționarea Alternativă a Litigiilor (ANPC SAL): Romanian alternative consumer dispute resolution, opens in a new tab, page in Romanian