Shenandoah GC Guide
Red Hat's concurrent low-latency GC — the default on every
ubi9/openjdk-21-runtime and ubi9/openjdk-25-runtime image.
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
What Is Shenandoah?
GC Defaults by Container Image
How Shenandoah Works
Shenandoah vs G1GC vs ZGC
When Each GC Wins
The Barrier Type Distinction
Configuration Reference
Monitoring Shenandoah
DegeneratedGC — What It Means
The On-Stage Framing
Reference Links
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