Why is the Java CPU usage different from the Windows Resource Monitor CPU usage?

262 views Asked by At

We are troubleshooting a performance of a Java application. And recently we have been using Application Performance Diagnostics tool for the application. Which also measures the CPU and Memory (don't know the exact method for it but contact the supplier about it). Besides that we have seen the Windows process/resource monitor with CPU usages. Those are quite different and we don't have any clue.

The Java application (openjdk8) running on a Windows server 2012 machine. When we measure the CPU from the Java App we see peaks from 100% till 500% all the time. While our Virtual Machine/Server has 12 CPU's and Windows resource monitor indicates all the time CPU usage of below 10-15%. I have few questions regarding this unclarity;

1 - Why is there a difference between the CPU measurement between the application and Windows Resource Monitor? 2 - How is it possible that it can burst 500%? 3 - Where can I adjust on Windows OS normally the application allocated CPU so that it has that 500% directly available as CPU resource

1

There are 1 answers

0
Thomas Kläger On

One difference between the two tools seems to be what is 100%:

  • your tool measures 1 core full busy = 100%, 5 cores full busy = 500%
  • the Windows resource monitor measures 12 cores full busy = 100%, 1 core full busy = 8%, 2 cores full busy = 16%

The other difference might be sampling / averaging period:

  • your tool might measure peak usage: 5 cores full busy at least once during the sampling period
  • the Windows resource monitor measures average usage: 5 cores busy during 40% of the sample time, all cores idle during the remaining time give an average of 16% usage of the full available capacity