Remix.run Logo
▲ brunoborges 20 hours ago

When cgroups / container awareness was added to OpenJDK, it was not on by default, and indeed there were versions that needed this flag. However, all modern JDKs 11 and later, have container awareness support on by default.

That said, this only makes the HotSpot JVM use cgroups data to interpret CPU and Memory limits. It does not make any special consideration of default ergonomics (thread pools, GC selection, heap sizing, and so on). Before the container awareness support, the JDK would read the VM/bare metal data; in other words, pre-container awareness support would result in this: if the VM has 32GB of RAM and a container is set for 4GB of memory limit, the JVM reads the 32GB as available memory.

All the defaults I mentioned still apply even inside a container.

Edit: no worries! thanks for sharing!