Linux: High Load Average while CPU 40% Idle

linux

Environment: Oracle Virtual Machine, 8 vCPU, 32GB.

I am seeing context switching averaging around 10000, but at times hitting 80000. It does not correspond to CPU SY% more than 2-3%. The CPU% still shows ~40% idle or so while load average at 60 or so (too high). CPU iowait between 40-60% at times.

Based on researching this, it seems

  1. All of this has to do with IO waits.
  2. The high context switching is not expensive since cpu sys is still
    very low. Thus I should not concern myself with it.

No idea why the load average is this high and the same time CPU shows ~40% idle.

Thanks for your input.

Best Answer

Install iotop, it will let you figure out who's consuming all that IO. Aside from that, load average is the average number of jobs in the run queue, that is, jobs that are ready to be executed but can't because the CPU is otherwise busy. It does relate to CPU usage, but not as directly as you'd expect.