Aikar's Flags: Peak Server Performance
Aikar's Flags are a set of optimized Java startup parameters that minimize "Garbage Collection" (GC) lag spikes. This is the single most important technical step for any server with more than 5 players.
The Flags (Copy/Paste)
Replace {Xmx} and {Xms} with your server's RAM amount (e.g., 8G):
Why Use These Flags?
- Reduced GC Latency: Standard Java stop-the-world collections cause the "Server Can't Keep Up" error. These flags make those collections happen in tiny, unnoticeable chunks.
- Pre-Touch RAM:
-XX:+AlwaysPreTouchforces the OS to allocate all requested RAM at startup, preventing lag later when players join. - G1GC Tuning: Specifically tuned for the high object-churn rate of Minecraft's ticking engine.
Where to Put Them?
If you are using a Management Panel (like Pterodactyl/Wings), these are usually set in the "Startup" tab under "Commands" or "JVM Flags".
If you are on Windows, put them in your run.bat file before the -jar argument.
Warning: Always ensure -Xmx (Max RAM) and -Xms (Min RAM) are the same value. This prevents the JVM from resizing the heap, which is a major source of lag.