container-awarenesslisted
Install: claude install-skill robsonkades/agent-skills
# Container Awareness
## Purpose
Decide whether the JVM's automatic sizing inside this container is the sizing you
actually want. HotSpot's `UseContainerSupport` — on by default since JDK 10 on supported
Linux builds — incorporates cgroup memory and CPU constraints into ergonomics, using
version-specific detection. It does not make the resulting heap, GC thread
count or JIT thread count right for the workload.
The failure this prevents is the confidently wrong container diagnosis: a pod killed for
non-heap charges while the heap sat at 70%, diagnosed without reconciling memory views;
or a detected CPU count inferred from the default `ActiveProcessorCount=-1` sentinel.
## Workflow
This is Linux HotSpot guidance, with JDK 17–25 as the main command baseline and a JDK 26
heap-default note in the reference. Inspect the runtime image's vendor/update, launch flags,
deployment resources and kernel/cgroup version; a build toolchain alone does not identify
production ergonomics. Do not upgrade the runtime to match these examples.
Start with the requested decision and existing deployment, runtime and measurement artifacts.
Reuse evidence that matches the target and workload; collect only gaps that could change the
answer. A flag explanation needs no new load test, and a budget that already meets its
headroom and latency goals may need no change.
1. **Establish what the target JVM detected, from inside its container.** A fresh
`java -XshowSettings:system` is a probe, not proof