Garbage collection for the humans
summary
Survey of JVM garbage collectors with concrete tradeoffs: mark‑and‑sweep and generational layout (Eden/survivor/old) explain promotion and premature promotion, Serial/Parallel stop‑the‑world behavior contrasts with CMS (deprecated), G1 (compacts regions, G1 prioritizes dirtiest regions) and the low‑pause contenders Shenandoah and ZGC (Shenandoah is described as almost fully concurrent). Practical tips include analyzing GC logs (GC Easy, JClarity) and avoiding large static arrays, large boxed primitives and unbounded ArrayList growth.
AI-written summary · about
chapters (26)
- 0:00Introduction and welcome
- 2:19Why garbage collection matters
- 5:11Garbage in computing and biology
- 6:55Manual vs automatic memory management
- 9:09History and purpose of garbage collection
- 10:55Performance vs productivity trade-off
- 16:27Designing a garbage collection system
- 18:31Serial garbage collector basics
- 20:16Memory fragmentation and compaction
- 21:25Evaluating garbage collection performance
- 23:15Memory layout in operating systems
- 24:43Stack and heap in Java
- 26:13Generational garbage collection
- 29:46Premature promotion and promotion failure
- 31:11Types of garbage collection events
- 32:16Evolution of garbage collectors
- 36:13Problems with generational collectors
- 36:58Garbage-First collector explained
- 39:28Concurrency challenges in GC
- 41:40Shenandoah and concurrent GC
- 42:23Zero and Epsilon garbage collectors
- 43:06Choosing the right garbage collector
- 44:10Tips and tricks for GC optimization
- 47:24Best practices for reducing garbage
- 49:31Static variables and memory leaks
- 50:18Tools for garbage collection analysis
related talks
50mTrash Talk - Exploring the JVM memory management
51mJava Garbage Collection - The Basics
16mGarbage Collectors: Battle Royale
46mTrash Talk - Exploring the Memory Management in the JVM
01mThe evolution of Garbage Collection Algorithms in Java
01h 01mOpenJDK: In the new age of Concurrent Garbage Collectors
25mGarbage Collection Primer
44mThe Fundamentals of Garbage Collector Performance
