RFR: 8264524: jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails due to swapping not working [v2]
Jie Fu
jiefu at openjdk.java.net
Tue Apr 6 10:55:26 UTC 2021
On Tue, 6 Apr 2021 09:40:39 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> if (memAndSwapLimit <= memLimit)
Hi @jerboaa ,
Unfortunately, this check fails to work on a host machine which doesn't support swapping (e.g., total size of Swap is 0 byte).
You can still specify --memory and --memory-swap as you like on a host machine without swapping space.
And Metrics.systemMetrics().getMemoryLimit()/getMemoryAndSwapLimit() do return the values as you specified.
But the swapping will never happen since there is no swapping space on the host machine.
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3286
More information about the hotspot-runtime-dev
mailing list