Container-Aware JVM: Before & After
π Used after slide 4
Loading diagramβ¦
How UseContainerSupport fixes the /proc/meminfo vs cgroup mismatch.
Speaker Notes
Walk-through: Left side (red) shows the broken state: JVM reads /proc/meminfo, sees 64GB of host RAM, claims a 16GB heap inside a 512MB container, and gets OOMKilled. Right side (green) shows the fix: UseContainerSupport reads cgroup limits, MaxRAMPercentage=75 sets heap to 384MB, and the pod runs healthily.
Key fact: UseContainerSupport is ON by default in Java 21. MaxRAMPercentage is NOT set to a sensible value by default β you must explicitly set it to 75%.