On Tue, 16 Apr 2024 15:17:33 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
> The idea here is to use this property to tune OpenJDK for in-container, > specifically k8s, use. In such a setup it's custom to run a single process > within set resource constraints. The in-container tuning means to use all the available resources. Containers in the real world have some memory limits set which is where my modified patch still correctly identifies it as a container to use all the available resources of the node which is the whole goal of the container detection code. > In order to do this, we need a reliable way to distinguish that vs. > non-containerized setup. I expect it should have been written "We need a reliable way to distinguish real world in-container vs. non-containerized setup. We do not mind behavior for artificial containers on OpenJDK development machines.". Which is what my patch does in an easier and less error-prone way. > If somebody really wants to run OpenJDK in a container expecting it to run > like a physical OpenJDK deployment, that's when `-XX:-UseContainerSupport` > should be used. That behaves still the same with my patch. Could you give a countercase where my patch behaves wrongly? ------------- PR Comment: https://git.openjdk.org/jdk/pull/18201#issuecomment-2060158409