ATM10 Errors // ChunkGC Bench
ChunkPregen OutOfMemoryError: DirectByteBuffer & Region Cache
Running Chunky across Overworld, Nether, and The Other in ATM10 saturates both Java heap and off-heap Netty/MCA DirectByteBuffers, crashing mid-pregen.
Measured ATM10 JVM & Spark Profile
World generation loads structure templates from 450+ mods and holds compressed anvil region buffers in native memory outside -Xmx. Setting -Xmx too close to container RAM starves DirectByteBuffer allocations and triggers either Java OOM or Linux cgroup kill.
| Subsystem / Signal | Measured Target | Operational Impact |
|---|---|---|
| Chunky 5,000-block radius RSS | +2.1 - 3.6 GB off-heap | Exceeds -Xmx by up to 4.2 GB with OS cache |
| Safe -Xmx ceiling on 16 GB node | -Xmx11G to -Xmx12G | Leaves 4 GB for DirectBuffer & page cache |
| Safe -Xmx ceiling on 32 GB node | -Xmx24G to -Xmx26G | Supports 10k radius pregen without OOM |
Step-by-Step Triage & Config Remediation
- Cap MaxDirectMemorySize: Pass -XX:MaxDirectMemorySize=1536M alongside a +3.5 to 4.2 GB off-heap OS buffer below mem_limit.
- Pre-generate while server is empty: Use chunky quiet 10 and avoid concurrent player exploration while pregen threads run.
- Upgrade to 32 GB GP8 for large radii: Worlds with >7,500 block radius pregen + 15+ players require 32 GB total host RAM.
/chunky radius 5000 /chunky quiet 10 /chunky start # user_jvm_args.txt: -Xms12G -Xmx12G -XX:MaxDirectMemorySize=1536M
Diagnostic FAQ
Why did my 16 GB server crash with -Xmx14G during Chunky?
At -Xmx14G, only 2 GB remains for Linux kernel, MetaSpace, and Chunky DirectBuffers; ATM10 requires +2.4 to 4.2 GB outside -Xmx.
Can I delete Chunky after pregen finishes?
Yes, or leave it idle; Chunky consumes negligible RAM when no pregen task is queued.