RFR: 8268098: jdk.CPULoad event reports incorrect CPU usage inside a container

Yasumasa Suenaga ysuenaga at openjdk.java.net
Mon Jun 7 12:44:05 UTC 2021


On Mon, 7 Jun 2021 12:26:06 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> Since there has been [JDK-8203359](https://bugs.openjdk.java.net/browse/JDK-8203359) implemented in JDK 17 I wonder if changing jdk.CPULoad event the way it's proposed makes sense. Maybe `ContainerCPUUsage` event should be used in order to gather this info instead?

I guess `ContainerCPUUsage` is more suitable rather than `CPULoad` in this case, but it is not documented. I aware this problem when I load flight record on JMC 8 - it seems to use `CPULoad` event to draw CPU usage chart. So JFR user might mislead CPU usage for their apps.

And also this problem affects CPU time in thread dump as I said before. It is not JFR event.

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

PR: https://git.openjdk.java.net/jdk/pull/4299


More information about the hotspot-runtime-dev mailing list