Cures for OOMKills, Warm-ups, and Slowness in JVM Containers
summary
Explains why JVM containers suffer OOMKills and slow startups due to off‑heap native memory (direct buffers, metaspace, native arenas, threads, file mmaps) increasing RSS, and recommends first increasing container memory then instrumenting with Native Memory Tracking (jcmd vm.native_memory), /proc/pid/maps or pmap, and Prometheus/Grafana RSS metrics. Advises using fixed Xms=Xmx or observing RSS stabilization, capturing slow C2 compilation with jcmd/JFR/JMC (example: C2 23s vs C1 6s), and mitigating native allocator fragmentation by using tcmalloc via LD_PRELOAD to stop RSS growth.
AI-written summary · about
chapters (8)
- 0:00JVM container problems
- 20:20Memory virtual vs RSS
- 49:50Native JVM monitoring
- 1:11:41Diagnosing OOMKills
- 1:35:54JVM startup with JFR
- 2:08:56CPU tuning in containers
- 2:31:47Monitoring best practices
- 2:38:05Q&A
related talks
51mOOMs!... I did it again
42mContainers & Java: What I wish I have been told!
32mMastering JVM Memory Troubleshooting - From OutOfMemoryErrors to Leaks
43mWho Ate My RAM?
34mTroubleshooting Native Memory Issues in Java Applications
45mCatching the 137-Killer: A Java Memory Forensics Investigation
50mCompressing Java resource usage in containers: 80% of results in 20% of time without OOMs
48mJava in Containers - Part Deux
