Shenandoah GC Guide

Red Hat's concurrent low-latency GC — the default on every ubi9/openjdk-21-runtime and ubi9/openjdk-25-runtime image.

View on GitHub ↗
If you're on OpenShift using UBI9: you're already running Shenandoah (1–20ms pauses) without any configuration. Demos 02 and 06 explicitly override it with -XX:+UseG1GC and -XX:+UseZGC for a clean comparison.

Sections

Choose Shenandoah when…

  • Deploying on OpenShift / UBI9 — already your default
  • p99 SLA between 20ms and 100ms
  • Medium to large heaps (4GB–100GB)
  • JDK 8+ support needed (Red Hat builds)

Choose ZGC when…

  • p99 SLA tighter than 10ms
  • Heap exceeds 32GB
  • HPA stability is critical (flat CPU profile)
  • JDK 21+ available
File location in repo
java-optimization-demos/SHENANDOAH-GC-GUIDE.md