If "top" indicates CPU is spending 10% on %wa (iowait), does that mean the CPU is idle?

5

I am referring to the Linux top command. If it indicates 10.4% was spent on wa, does that mean 10.4% CPU was available for other processes?

top - 09:40:45 up 178 days, 34 min,  1 user,  load average: 0.32, 0.43, 0.42
Tasks: 173 total,   1 running, 172 sleeping,   0 stopped,   0 zombie
Cpu(s): 1.3%us,  1.1%sy,  0.0%ni, 87.2%id,  10.4%wa,  0.0%hi,  0.0%si,  0.0%st

Sabya

Posted 2011-04-22T14:43:00.337

Reputation: 187

Answers

1

wa is the time the CPU is waiting for I/O to complete. 87.2%id is the amount of CPU spends in idle, and therefore would be available for other processes.

Tommy

Posted 2011-04-22T14:43:00.337

Reputation: 126

1Not entirely true, if I have understood your answer correctly. Both wa (IO wait) and id (idle) time are available for other processes to use. – Benjamin Goodacre – 2014-10-29T11:17:59.750

1

The percentage expressed in wa (IOwait) does not convey idle time on the CPU. It could indeed be idle or it could be being used by another process.

The percentage expressed in id (idle) does not express total idle time either, this is idle-time not otherwise allocated. The percentage of CPU time available for other processes can be expressed as 100 - us (user) - sy (system) .

Benjamin Goodacre

Posted 2011-04-22T14:43:00.337

Reputation: 516