[8u] RFR: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers
Severin Gehwolf
sgehwolf at redhat.com
Mon Aug 23 17:31:47 UTC 2021
Hi,
Please review this OpenJDK 8u backport of 8269851 which fixes an issue
of process CPU load calculation of the OS MXBean when run with CPU
limits in a container. Please see the bug how this manifests. The
OpenJDK 11u patch doesn't apply cleanly since getProcessCpu0() isn't in
8u (introduced with JDK-8022323; non-public) and some context
differences.
Part of this backport moves previously native getProcessCpuLoad() ->
getProcessCpuLoad0() and makes it private. Otherwise the patch is the
same as the JDK 11u variant.
Bug: https://bugs.openjdk.java.net/browse/JDK-8269851
webrev: https://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8269851/jdk8/01/webrev/
Testing: Builds on AIX, Solaris, Linux, Windows, Mac. Manual tests on
Linux x86_64 using the reproducer.
Thoughts?
Thanks,
Severin
More information about the jdk8u-dev
mailing list