Skip to content

Incorrect CPU usage reported on OpenJ9 #235

@keithc-ca

Description

@keithc-ca

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:

  1. Using an OpenJ9 JVM, start a Java application, enabling JMX access via the normal system properties.
  2. Start VisualVM and connect via JMX to that application.
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions