Garbage Collection Primer
summary
Quick, actionable GC notes: prefer G1 or ZGC for backend services, test at least two collectors, and re-evaluate across JDK releases. Measured gains: P99 pause down 120→60 ms on a 16 GB heap and throughput +~40% from JDK8→17; footprint for a 16 GB heap drops from ~2 GB native overhead in JDK8 to <750 MB in JDK21 (parallel ≈700–900 MB by JDK23). ZGC runs generational by default in JDK 23; serial suits tiny containers, parallel still wins pure throughput in some cases.
AI-written summary · about
chapters (15)
- 0:00Welcome
- 1:06Goals
- 2:08Throughput latency footprint
- 3:30Choosing garbage collectors for applications
- 5:16Parallel GC throughput
- 8:07Measuring GC performance
- 9:10Java version improvements
- 10:56GC design differences
- 12:20Garbage collection in Kubernetes environments
- 14:29Modern Parallel GC
- 17:01Generational ZGC benefits
- 19:10ZGC future generational
- 21:37Kubernetes config
- 23:01ZGC low memory
- 24:07Q&A
related talks
43mGarbage Collection in Java: The Performance Benefits of Upgrading
45mJava Garbage Collectors’ Current Performance Impact
48mZGC: A Decade of Redefining Java Performance
19mZ Garbage Collector: The Next Generation
46mZGC: A Scalable Low-Latency Garbage Collector
44mGarbage Collector: How to Tame the Beast and Make It Your Best Ally
52mGarbage collection for the humans
50mTrash Talk - Exploring the JVM memory management
