RFR: 8292083: Detected container memory limit may exceed physical machine memory [v19]

Severin Gehwolf sgehwolf at openjdk.org
Thu Aug 25 17:55:34 UTC 2022


On Thu, 25 Aug 2022 17:43:42 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> I think the gist of my remark is that I would like the layers to behave consistently.
> 
> I see that `CgroupSubsystem::memory_limit_in_bytes()` is only used in two places, `os::Linux::available_memory() ` and `os::physical_memory`.

You mean `OSContainer::memory_limit_in_bytes()` right?

> I would say let the `os` layer lie and `Linux` and `CgroupSystem` be the truth. Then we end up with a clear hierarchy:

There is also this `OSContainer` hybrid ;-)

>     * let `os::Linux::available_memory()` and `os::Linux::physical_memory()` return the pure host values
>     * let the cgroup system return the pure cgroup values
>     * let `os::available_memory()` and `os::physical_memory()` return either one or the other depending on what makes sense.
> 
> In addition, let the cgroup subsystem return defined values for "invalid" (if that is possible).

Sounds reasonable to me.

> Would that make sense? I don't think this would be a huge effort. We also could do it in a separate RFE.

+1

-------------

PR: https://git.openjdk.org/jdk/pull/9880


More information about the hotspot-runtime-dev mailing list