RFR: 8334489: Add function os::used_memory [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Wed Jun 19 19:08:09 UTC 2024
On Wed, 19 Jun 2024 18:53:11 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> Just for some context... I'm working on automatic heap sizing for ZGC. Part of the heuristics want to reason about some sort of "memory pressure" on the machine, which is vaguely related to what portion of the machine or container memory is used vs not used.
That work is not supposed to also adjust to changing memory limits **at JVM runtime** is it? I'm not aware that the JVM is yet ready to do that.
> Because we only expose free and available which depend on the container size. And to calculate the fraction I would have to ask for the container size again. If the two reported sizes are inconsistent, you are bound to get nonsense values.
Why would they be inconsistent? Change the limit at JVM runtime?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19772#issuecomment-2179329745
More information about the hotspot-runtime-dev
mailing list