Three flavors of generational GC: G1, ZGC, Shenandoah
summary
All three collectors adopt a generational design in generational ZGC in Java 25 and behavior differs sharply: Capo benchmarks show ZGC has the lowest pause times, Shenandoah sits in the middle with concurrent compaction via Brooks pointers, and G1 produces the highest pauses but wins throughput on four of the measured workloads (LU index ties with ZGC). Production experience with 5 TB heaps highlights fragmentation needs and the value of the Shenandoah visualizer. Note: ZGC lacks a full serviceability agent; two tickets remain open.
AI-written summary · about
chapters (10)
- 0:00Generational GC overview
- 3:08Why generational GC matters
- 4:34Heap layout differences
- 6:23Stop-the-world vs concurrent trade-offs
- 7:52Heap region visualization
- 8:57Benchmarking results
- 10:49ZGC and Shenandoah pauses
- 12:14Performance comparison
- 13:41Serviceability considerations
- 14:05Choosing the right GC
related talks
01h 01mOpenJDK: In the new age of Concurrent Garbage Collectors
34mGenerational ZGC and Beyond
49mConcurrent Garbage Collectors: ZGC & Shenandoah
45mG1, ZGC, Shenandoah… With All These GCs in Java, Which One Do I Choose?
47mConcurrent Garbage Collectors: ZGC & Shenandoah
25mGarbage Collection Primer
39mZGC - Paving the GC On-Ramp
44mMastering GC: tame the beast and make it your best ally
