-XX:+UseG1GC
summary
G1 becomes the JDK9 default and splits the heap into 2,000–4,000 fixed regions (1–32 MB) and treats very large arrays as humongous objects if > half a region. It uses remembered sets (≈5% footprint) and mixed GCs that clean selected old regions alongside young collections. Full GC is single‑threaded and can take 15–20s on a 20 GB heap. Tune InitiatingHeapOccupancyPercent, G1ReservedPercent, concurrent GC threads and enable ParallelRefProcEnabled to avoid costly full collections.
AI-written summary · about
chapters (14)
- 0:00Introduction and speaker intro
- 2:37Why garbage collection matters
- 5:28Generational hypothesis explained
- 13:04Card tables and remembered sets
- 17:02G1 GC heap regions
- 26:06G1 GC collection types
- 33:42Mixed and full GC in G1
- 36:35Humongous objects in G1
- 39:29Tuning G1 GC for latency
- 43:25Concurrent mode failures
- 46:38Analyzing G1 GC logs
- 48:07When to use G1 GC
- 50:12G1 GC as default in JDK9
- 51:18Q&A and closing








