JVM Memory Regions in a Container
π Used after slide 5
Loading diagramβ¦
Six memory regions the JVM uses β MaxRAMPercentage only controls one of them.
Speaker Notes
Walk-through: The left column shows the container with its 2GB limit. Heap is the largest region (50-75%), but five other regions β Metaspace, thread stacks, native memory, direct ByteBuffers, and GC bookkeeping β share the remaining 25%.
Key point: Spring Boot loads 10,000-15,000 classes at startup, which means Metaspace usage is typically 80-250MB. Setting MaxRAMPercentage=90 starves these off-heap regions and causes OOMKills even when heap metrics look healthy.