ATM10 Fixes // ChunkGC Bench
Generational ZGC Java 21 Flags for All the Mods 10
Java 21 Generational ZGC separates short-lived NeoForge tick objects from long-lived chunk caches, holding garbage collection pauses under 2 milliseconds even at 24-32 GB heaps.
Measured ATM10 JVM & Spark Profile
Unlike G1GC, which pauses the entire Minecraft server thread to evacuate memory regions, Generational ZGC performs concurrent marking and relocation. On 16 GB+ hosts running 450+ NeoForge mods, it eliminates rubber-banding during exploration and boss fights.
| Subsystem / Signal | Measured Target | Operational Impact |
|---|---|---|
| Required Java Runtime | Java 21.0.4+ (64-bit) | Mandatory for -XX:+ZGenerational |
| Max Stop-The-World Pause | 0.4 - 1.8 ms | 95% lower than untuned G1GC |
| Safe -Xmx Ceiling | Host RAM minus 3.2-4.2 GB | Prevents Docker cgroup Exit 137 |
Step-by-Step Triage & Config Remediation
- Confirm Java 21 binary: Ensure your startup script or Docker image (itzg/minecraft-server:java21) uses JDK 21+.
- Strip conflicting G1GC flags: Remove all -XX:+UseG1GC and -XX:G1* flags from user_jvm_args.txt before adding ZGC.
- Enable AlwaysPreTouch & NUMA: Commit heap pages at boot with -XX:+AlwaysPreTouch and leave 2.4-4.2 GB free on the host.
-Xms12G -Xmx12G -XX:+UseZGC -XX:+ZGenerational -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:MaxMetaspaceSize=1024M -XX:MaxDirectMemorySize=1536M
Diagnostic FAQ
Can I use Generational ZGC on an 8 GB server?
ATM10 requires at least 10-12 GB heap plus off-heap reserve (16 GB total node). On 16-64 GB nodes, ZGC performs best.
Should -Xms equal -Xmx with ZGC?
Yes. Matching -Xms and -Xmx prevents ZGC from repeatedly resizing the virtual heap at runtime.