
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.
Startup tab, JVM Arguments field. Paste the flag string below, then restart.
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
- 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
- 2Replace both
<RAM>values with your plan's RAM in megabytes. - 3Log into the CraftLands panel, open your server, go to Startup.
- 4Paste the string into the JVM Arguments field. Don't include
java,jar, orserver.jar, the panel adds those on its own. - 5Save, then restart the server.

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.




