Container Awareness

What the JVM actually detects inside a container: cgroup v1 versus v2 detection, ActiveProcessorCount and how a CPU quota becomes a processor count, MaxRAMPercentage and every ergonomic derived from it, GC and JIT thread counts sized from the wrong number, and verifying all of it from inside the running container. Use when a pod is OOMKilled while heap usage is well below Xmx, when a Deployment has no resources.limits or sets limits.memory equal to Xmx, when MaxRAMPercentage is pushed to 90, when someone reads ActiveProcessorCount out of PrintFlagsFinal or jcmd VM.flags and gets -1, when a cgroup command reads /sys/fs/cgroup/cpu/cpu.stat and finds nothing, or when latency spikes have no matching GC pause. Does not cover host-side kernel behaviour such as the node OOM killer, page faults, swap, PSI or signals (linux-for-jvm), the memory-region budget itself (jvm-memory-regions), or CPU topology and pinning (numa-and-cpu-affinity).

robsonkades ded9893 4 files · 22.5 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/container-awareness commit ded9893ed2

Frequently asked questions

npx skillmds@latest add robsonkades/container-awareness