Why Is My CPU Idle Yet Load Is High? Uncover Linux Load & I/O Bottlenecks
High system load can occur even when CPU usage is low, typically due to many processes waiting for disk I/O; this article explains load concepts, process states, scheduling, and common scenarios such as excessive I/O requests, unindexed MySQL queries, and faulty external storage that cause such bottlenecks.
Reason Summary
The one‑sentence cause: too many processes are waiting for disk I/O, making the run‑queue long while few processes actually use the CPU, so load appears high but CPU utilization is low.
What Is Load?
Load is the total number of processes that are either running on the CPU or waiting for the CPU to run them. It reflects the length of the CPU run‑queue; a smaller number is better (values above CPU cores × 0.7 are abnormal).
Load consists of two parts: CPU load and I/O load.
Examples:
CPU‑bound programs (e.g., large scientific calculations) are "compute‑intensive" and depend mainly on CPU speed.
I/O‑bound programs (e.g., searching large files on disk) are "I/O‑intensive" and depend on disk speed.
What Is a Multitasking Operating System?
Linux can run many tasks simultaneously, sharing limited hardware resources such as CPU and disk. When many tasks compete, each must wait for its turn, causing delays.
When the system is lightly loaded, tasks rarely wait. As the number of tasks grows, processes may have to wait for CPU time or I/O completion, leading to higher load.
<code>[root@localhost ~]# uptime
11:16:38 up 2:06, 4 users, load average: 0.00, 0.02, 0.05</code>The three numbers are the average number of tasks waiting to run over the past 1, 5, and 15 minutes. A high load indicates many tasks are waiting, which can cause noticeable latency.
Process Scheduling
Process scheduling (or CPU context switching) saves the state of the current process and restores the state of the next one, moving a running task to a ready or blocked state and selecting another ready task to run.
In the Linux kernel each process has a descriptor that the scheduler orders by priority.
The scheduler manages several process states, including:
Waiting for CPU resources.
Waiting for disk I/O to finish.
Key states:
Running : the process can use the CPU whenever it is free.
Interruptible sleep : waiting for an event with an unpredictable delay (e.g., keyboard input).
Uninterruptible sleep : short‑term wait, typically for disk I/O.
Runnable : ready to run but not currently executing.
Zombie : terminated but not yet reaped by its parent.
Example scenario:
Processes A, B, C start in the running state.
The scheduler gives the CPU to A; B and C wait.
A performs a disk read and becomes uninterruptible (blocked on I/O).
The scheduler selects B (higher priority) to run.
B soon waits for keyboard input and becomes interruptible.
Now A is blocked on I/O, B is waiting for input, and C is running.
When A’s I/O completes, it returns to the runnable state and may run again.
The Meaning of Load
Load counts the average number of processes waiting for CPU time or I/O. Only processes in the running and uninterruptible (I/O‑waiting) states contribute to the load value.
Why Can CPU Usage Be Low While Load Is High?
High load with low CPU usage occurs when many processes are blocked on disk I/O, inflating the run‑queue while the CPU remains idle or busy with other tasks.
Typical scenarios:
Scenario 1: Excessive disk read/write requests cause many processes to enter uninterruptible sleep.
Scenario 2: MySQL queries without indexes or deadlocks trigger massive I/O, blocking many processes.
Scenario 3: Faulty external storage (e.g., NFS server down) leads to endless I/O waits.
For MySQL, running
show full processlisthelps identify blocking queries for optimization.
Conclusion
The article outlines how load reflects the number of processes waiting for CPU or I/O, explains process states and scheduling, and lists common situations that cause high load with low CPU utilization.
Source: 西门飞冰的博客, http://www.fblinux.com/?p=281
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.