Describe the bug
CPU usage values are scaled by OperatingSystemMXBean.ProcessingCapacity (when that attribute is present).
Instead, average increases of OperatingSystemMXBean.ProcessCpuTime per second should be expected to be between
0 and OperatingSystemMXBean.ProcessingCapacity.
To Reproduce
Steps to reproduce the behavior:
- Using an OpenJ9 JVM, start a Java application, enabling JMX access via the normal system properties.
- Start VisualVM and connect via JMX to that application.
- Observe the CPU usage graph which shows 100% even when the application is idle.
This problem is not seen with Hotspot because it does not provide the OperatingSystemMXBean.ProcessingCapacity attribute.
Expected behavior
The CPU usage graph should reflect actual use.
Desktop (please complete the following information):
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-b01)
Eclipse OpenJ9 VM (build openj9-0.21.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200728_727 (JIT enabled, AOT enabled)
OpenJ9 - 34cf4c075
OMR - 113e54219
JCL - c82ff0c20f based on jdk8u265-b01)
Proposed solution
master...keithc-ca:capacity
Describe the bug
CPU usage values are scaled by
OperatingSystemMXBean.ProcessingCapacity(when that attribute is present).Instead, average increases of
OperatingSystemMXBean.ProcessCpuTimeper second should be expected to be between0 and
OperatingSystemMXBean.ProcessingCapacity.To Reproduce
Steps to reproduce the behavior:
This problem is not seen with Hotspot because it does not provide the
OperatingSystemMXBean.ProcessingCapacityattribute.Expected behavior
The CPU usage graph should reflect actual use.
Desktop (please complete the following information):
Proposed solution
master...keithc-ca:capacity