Garbage Collection Semantics
summary
Explains practical Go GC behavior: three phases (mark setup stop‑the‑world, concurrent marking, mark termination stop‑the‑world) with typical stop times ~10–30µs and ~60–90µs, the GC percentage default 100% means new allocations may equal live heap before next cycle, the collector takes 25% CPU for marking, heavy allocators get a proportional mark assist, sweeping runs later during new allocations, pacing can start collections early, and reducing allocation volume (not increasing GC interval) raises useful work between collections.
AI-written summary · about
chapters (13)
- 0:00Introduction and motivation
- 1:47Heap memory model
- 3:57Garbage collection phases
- 7:30Mark setup and write barrier
- 9:17Mark assist and CPU usage
- 10:24Mark termination and cleanup
- 11:30Sweeping after collection
- 14:04GC percentage explained
- 16:35Understanding GC traces
- 22:36Pacing algorithm and latency
- 24:22Reducing allocations impact
- 25:23Latency costs during collection
- 26:27Key takeaways and summary
related talks
50mAn insight into Go Garbage Collection
30mBalanced GC: A Copying Garbage Collector for Golang
36mGolang's Realtime GC in Theory and Practice
30mMemory Management in Go: The good, the bad and the ugly
24mAdvancing Go Garbage Collection with Green Tea
48mGolang's Garbage
30mGo: escape analysis
26mRespecting Memory Limits In Go
