Principles of Memory Management in Java
summary
Explains why all JDK collectors use moving generational collectors and how that lets Java trade RAM for far less CPU: CPU cost scales with allocation rate divided by heap headroom, so doubling heap headroom cuts GC CPU. Gives concrete knobs and measurements: set XMX (default 25% is usually wrong), monitor allocation and GC CPU with JMX and JFR, and add ~100 MB per added core to stop GC spikes in high-allocation benchmarks. Announces dynamic heap sizing for ZGC coming to automate this.
AI-written summary · about
chapters (16)
- 0:00Java memory management intro
- 1:08Memory in computation
- 5:00Stack vs heap memory
- 6:46Manual memory limits
- 11:02GC vs manual management
- 15:14Moving GC reduces CPU
- 20:35Generational GC explained
- 26:55RAM and CPU trade-offs
- 31:11Hardware cost split
- 35:26Problems with software performance benchmarks
- 37:35Heap size optimization
- 39:21Moving collectors limits
- 41:48Low-latency garbage collection in modern JDKs
- 42:51RAM and CPU as resource
- 43:37Measuring JDK26 performance
- 44:41Automatic heap sizing
related talks
46mTrash Talk - Exploring the Memory Management in the JVM
49mTrash Talk: Exploring the JVM memory management
50mTrash Talk - Exploring the JVM memory system
25mGarbage Collection Primer
50mTrash Talk - Exploring the JVM memory management
51mJava 10/11 Memory Management and GC
52mUnderstanding Java Garbage Collection
59mKeynote: Industry GC Insights from OpenJDK
