Java Garbage Collectors’ Current Performance Impact
summary
G1 is the Java default, CMS is deprecated and ZGC is the new low‑pause collector coming up; practical measurements use JMH and native memory tracking. A JMH test on a 100k-int set shows an epsilon/no‑GC baseline of ~145 ops/s, while forcing collections lets parallel GC give ~5× throughput and ~2.5× fewer cache misses by compacting hot objects. Microbenchmarks reveal write barriers (shuffle test) cut performance to about one third versus epsilon and CMS degrades on large heaps (4–64 GB) due to compressed‑oops and fragmentation.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:47Key Question
- 2:44Garbage Collector
- 4:49Targeting of Collectors
- 5:34Parallel Garbage Collectors
- 7:40Memory
- 10:00Native Memory
- 11:58General Thoughts
- 12:32Gmage Benchmark
- 17:00Parallel GC Results
- 20:32Write Barriers
- 24:36Read Barriers
- 24:58Reference Comparison Operations
- 31:57Garbage Collector Pause
- 32:22Safe Points
- 33:01Example
- 40:16Demo
related talks
25mGarbage Collection Primer
35mJava: Memory cleanup in Java 9–14
44mGarbage Collector: How to Tame the Beast and Make It Your Best Ally
50mGarbage Collection in Java: The progress since JDK 8
19mZ Garbage Collector: The Next Generation
51mJava Garbage Collection - The Basics
52mGarbage collection for the humans
01h 01mOpenJDK: In the new age of Concurrent Garbage Collectors
