CPU profiling shows extremely high system usage

Questions about YourKit Java Profiler
Post Reply
omera
Posts: 5
Joined: Wed Dec 02, 2020 4:06 pm

CPU profiling shows extremely high system usage

Post by omera »

I ran profiling on my Scala application, and the CPU usage graph shows extremely high system CPU usage (minimum 64%, maximum 88%).
1. What CPU usage falls under "System"?
2. Any ideas on where should I start to understand what causes this?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: CPU profiling shows extremely high system usage

Post by Anton Katilin »

1. What CPU usage falls under "System"?
It's the overall CPU usage on the machine which runs the profiled application. The usage is obtained via corresponding system calls specific to the OS in use.
The profiler shows it to present the whole picture: the performance of the profiled application can be affected by other processes running on the same machine.
2. Any ideas on where should I start to understand what causes this?
To find out why the application consumes CPU please perform CPU profiling:
https://www.yourkit.com/docs/java/help/ ... filing.jsp

If stack telemetry is recorded, you can also estimate the CPU usage:
https://www.yourkit.com/docs/java/help/ ... mation.jsp
omera
Posts: 5
Joined: Wed Dec 02, 2020 4:06 pm

Re: CPU profiling shows extremely high system usage

Post by omera »

I see. Can I say for sure that the high system CPU is not related to the profiled application, or could it be that the high system CPU is indirectly caused by the profiled app?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: CPU profiling shows extremely high system usage

Post by Anton Katilin »

The process CPU usage (filled), as the name suggests, is associated with the profiled process itself i.e. the profiled application. This can be activities in Java level code or in native code, but anyway it's the activity inside the JVM process. It does not include CPU usage in other processes, e.g. child processes possibly started from within the JVM.

The system CPU usage (red dotted line) shows total CPU usage on the machine. It includes activities in all running processes.
Post Reply