Memory Why You Need to Care
summary
Concrete claim: excessive short-lived allocations make the JVM memory system and hardware caches thrash, turning many allocations into cache misses that cost roughly 91 CPU ticks per miss on DDR4‑2133 and limit practical allocation throughput to about 8 GB/s. Aim for allocation rates under 1 GB/s; cutting churn commonly yields 2–4x speedups (one case ~40% improvement). Use profilers that report allocation frequency with stack traces, target hot sites for fixes, and prefer escape analysis/scalar replacement over simply enlarging eden.
AI-written summary · about
chapters (15)
- 0:00Introduction to memory importance
- 1:05Why memory efficiency matters
- 2:51How Java uses memory
- 3:54Excessive memory churn explained
- 6:25War stories on memory inefficiency
- 8:33Cost of memory allocation in Java
- 11:45CPU cache hierarchy and latency
- 16:45Memory allocation rate limits
- 20:37Revolving door performance pattern
- 22:45Ideal allocation rate targets
- 24:11Detecting memory inefficiency
- 25:35Profiling memory allocations
- 28:01Importance of monitoring
- 30:53CPU utilization misconceptions
- 31:15Key performance metrics
related talks
39mMemory Efficient Java
21mMemory Efficient Java
54mThe Dark Arts of Performance Tuning
51mUnderstanding Allocator Impact on Runtime Performance in C++
40mLudicrous Speed: Designing For Performance on the JVM
34mTroubleshooting Native Memory Issues in Java Applications
34mOptimizations in Multiple Dimensions
01h 05mPerformance Optimization in Software Development - Being Friendly to Your Hardware
