Page created: 4 Feb 2020 |
Page updated: 22 Jul 2020
To investigate CPU consumption on a per-CPU basis, use the mpstat command with a time interval in seconds, like:
On Linux systems, it might be necessary to add "-P ALL" to the command, like:
mpstat -P ALL 5
Among other things, this shows the percentage of time each CPU has spent in user time, system time, and idle time. If the overall CPU utilization is relatively low but mpstat reports that one CPU has a much higher utilization than the others, there might be a significant bottleneck within the server or the JVM might be performing certain types of garbage collection which cannot be run in parallel. On the other hand, if CPU utilization is relatively even across all CPUs, there is likely no such bottleneck and the issue might be elsewhere.