choosing a java garbage collector
Garbage collector choice depends on hardware and performance goals, with G1 maximizing throughput, ZGC minimizing pauses, and Shenandoah fitting specific modpacks.
- The launcher currently defaults to ZGC when 8GB or more RAM is allocated, provided it does not exceed one-third of total system memory
- G1 provides the highest throughput and framerates, while Shenandoah yields the lowest throughput despite suiting heavy modpacks or Distant Horizons
- ZGC supports up to 16TB heaps and delivers lower pause times at the cost of higher memory consumption
- ZGC is best suited for systems with abundant spare memory and processor cores
- Launcher logic allocating specific collectors may no longer be necessary now that stock instances run Java 25


