RFR: 8292083: Detected container memory limit may exceed physical machine memory
Severin Gehwolf
sgehwolf at openjdk.org
Wed Aug 17 09:53:36 UTC 2022
On Wed, 17 Aug 2022 09:31:04 GMT, Jonathan Dowland <jdowland at openjdk.org> wrote:
> > This looks mostly good. I'd prefer if we changed the test to not rely on `InitialHeapSize` as that might get ergonomically set.
>
> Hmm I see what you mean, yes. I liked checking a Flag, versus (or as well as) checking a trace log line, as I felt it gave better assurance. But even with `-XX:InitialRAMPercentage` set, `InitialHeapSize` is still indeed ergonomic. I'll check over all the other flags and see if there's a better candidate.
Hence my suggestion to check what `os::physical_memory()` returns via `WhiteBox`. Many GC heap settings are derived from physical memory. So checking that it never exceeds actual physical host memory should be sufficient.
-------------
PR: https://git.openjdk.org/jdk/pull/9880
More information about the hotspot-runtime-dev
mailing list