Garbage First Garbage Collector
summary
G1 becomes the default in Java 9 and combines concurrent marking with incremental compaction via mixed collections; regions are 1–32 MB and an object >= 50% of a region is treated as humongous. Logs shown are JDK 8 GC output (Java 9 uses unified logging). Tunables demonstrated: -XX:InitiatingHeapOccupancyPercent (IHOP default ~45%), -XX:ConcGCThreads, -XX:G1MixedGCLiveThresholdPercent (default ~85%), -XX:G1HeapWastePercent (default 5%), G1MixedGCCountTarget and oldCSet thresholds. Examples show evacuation failures and repeated full GCs when heap is constrained (1 GB) and resolution by increasing heap to ~4 GB.
AI-written summary · about
chapters (21)
- 0:00Intro
- 5:11Traditional Java Heap
- 6:00Garbage First GC - Heap Regions
- 6:44G1 GC Heap Regions
- 7:55Humongous Objects
- 10:18Collection Set
- 13:22Remembered Sets
- 15:43G1 GC - Pause Histogram
- 20:27Initiating Heap Occupancy
- 21:29Stages of Concurrent Marking
- 23:18The Garbage First Collector
- 24:53Why Tame Mixed Collections?
- 25:48What Can We Do?
- 26:03Adjusting Each Mixed Collection
- 28:07Eliminating Expensive Old Regions From Mixed Collections
- 30:55Major Contributor?
- 35:24So, What Did We Observe?
- 36:32G1 Heap Waste Percentage
- 36:58G1 Mixed GC (Region) Liveness Threshold
- 39:32Avoiding Evacuation Failures
- 45:11Plot Allocation & Promotion Rates
related talks
52m-XX:+UseG1GC
48m-XX:+UseG1GC
01h 14mHave you really taken the time to know me: A G1 GC saga
51mJava Garbage Collection - The Basics
25mGarbage Collection Primer
01h 01mOpenJDK: In the new age of Concurrent Garbage Collectors
51mJava 10/11 Memory Management and GC
50mGarbage Collection in Java: The progress since JDK 8
