Shenandoah vs ZGC for Minecraft Servers 2026: Which GC Is Better?

Published on

Shenandoah vs ZGC garbage collectors compared for Minecraft servers: pause times, throughput, RAM usage, and which to use with Paper, Fabric, and NeoForge.

Both Shenandoah and ZGC are low-pause garbage collectors designed to minimize the stop-the-world pauses that cause Minecraft server lag spikes. Here is how they compare.

Quick Comparison

FeatureZGCShenandoah
DeveloperOracleRed Hat
Pause timesSub-millisecondLow millisecond
JDK availabilityAll major JDKs (17+)OpenJDK, Red Hat builds
Heap supportMulti-terabyteMulti-terabyte
CPU overheadModerateModerate
Memory overhead~15-20% extra~10-15% extra
Best forLarge heaps (10+ GB)Medium to large heaps

For Minecraft Servers

ZGC

ZGC's sub-millisecond pauses are ideal for Minecraft servers where even small lag spikes (50ms+) cause noticeable block lag and rubberbanding. ZGC performs garbage collection concurrently with the game thread, meaning TPS stays stable even during GC cycles.

-XX:+UseZGC

Shenandoah

Shenandoah also performs concurrent GC with low pauses. It uses slightly less memory overhead than ZGC but may have marginally higher pause times. Shenandoah is a good choice on Red Hat-based systems or when ZGC is not available.

-XX:+UseShenandoahGC

Which Should You Choose?

Use ZGC if:

  • You allocate 8+ GB RAM to your server
  • You run heavy modpacks (ATM10, Cobblemon)
  • You use Java 21 (ZGC is mature in Java 21)
  • You want the lowest possible pause times

Use Shenandoah if:

  • ZGC is not available in your JDK distribution
  • You want slightly lower memory overhead
  • You run on Red Hat / CentOS / Fedora systems

Use G1GC (default) if:

  • You allocate less than 8 GB RAM
  • You use Aikar's flags (tuned for G1GC)
  • You run a vanilla or lightly modded server

FAQ

Is ZGC better than Shenandoah for Minecraft? Slightly. ZGC has lower pause times. Both are much better than G1GC for large heaps.

Can I use Shenandoah with GraalVM? GraalVM ships ZGC. Shenandoah is available in standard OpenJDK builds.

Should I switch from Aikar's flags? Aikar's flags are tuned for G1GC. If you allocate 10+ GB RAM, ZGC or Shenandoah with different flags may perform better.

Related: ZGC vs G1GC for Minecraft, Best JVM arguments, GraalVM for Minecraft

Start Your MC Server Now Today

Join content creators worldwide who trust our Minecraft infrastructure. Setup is instant and support is always available. Start from €0.90/mo (Dirt) or €2.70/mo (Coal) and go live in minutes.