Skip to Content

CPU utilization Not Evenly distributed

A system is having a single core, and if there is a single process consuming all the CPU Time, then CPU utilization will show 100% utilization.

But in the case of multi-core systems, it is not necessary that all the CPUs are been used for running all processes. In such cases, uneven CPU utilization across the available CPUs is a expected behavior.

Boost Your Website Speed!

If you want your website to run as fast as ours, consider trying Cloudways. Their powerful cloud infrastructure and optimized stack deliver exceptional performance. Free migration!

CPU utilization is not evenly distributed across all cores

The reason behind uneven CPU utilization is that, it is not always a useful thing to switch CPUs. There are multiple things need to be performed on top of context switching.

Therefore increase in context switching will further increase the latency. It is useful to do context switching only if a single CPU is not able to cope up with the number of processes waiting for CPU in runq.

The final intent of above explanation is that if there is 100% CPU utilization on single CPU and 20-30% on remaining CPU’s then it is not a problem always, provided the process is not having CPU affinity set for a particular CPU.

In general OS does not imply any CPU affinity on its own. Either a application or user needs to tell kernel to pin a processes to a particular CPU or set of CPU’s.

If a process is facing a performance degrade due to high CPU utilization then only it should be addressed.