Tuesday, July 3, 2018

What is the meaning of %iowait as reported by utilities such as sar or top ?

source

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Issue

  • What is the meaning of %iowait as reported by utilities such as sar or top ?

Resolution

  • Following is the definition taken from the sar manpage :
%iowait
           Percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
  • So, %iowait means that from the CPU point of view, no tasks were runnable, but at least one i/o was in progress. iowait is simply a form of idle time when nothing could be scheduled. The value may or may not be useful in indicating a performance problem, but it does tell us that the system is idle and could have taken more work.

Comments

  • A CPU can be in one of four states :  user, sys, idle or iowait. Tools such as vmstat, iostat, sar, etc. print out these four states as a percentage. The kernel maintains this information using counters for each of the states and more. On each clock interrupt, the kernel checks the CPU state and increaments the appropriate counter. You can check the counters in /proc/stat.

No comments:

Post a Comment