4

Looking at iostat, if the system needs to issue a request for io, but has not yet been able to do so due to %util being pegged, would that wait be counted as %idle or %iowait?

modsiw
  • 76
  • 1
  • 3

3 Answers3

3

The meaning of three concepts:

%util:The previous answer has clearly described the meaning of idle.

%idle:The system is idle, that is, there is no running process.

%iowait: For a given CPU, the I/O wait time is the time during which that CPU was idle (i.e. didn’t execute any tasks) and there was at least one outstanding disk I/O operation requested by a task scheduled on that CPU (at the time it generated that I/O request).

High %util means that IO is busy, and the rate of the IO system is much lower than the processing rate of the CPU, so:

1) If the system has some CPU-intensive tasks running, the CPU will run other tasks while the IO is waiting, the CPU usage is high, and the %idle is low. At the same time %iowait is low (iowait indicates the proportion of IO transmission when IDLE)

2) If the system has no tasks to run, the CPU is idle when IO waits, this time the CPU usage is low, %idle is high, %iowait is high.

Jams.Liu
  • 131
  • 2
1

%iowait, which is the time spent waiting for availability.

Avery Payne
  • 14,326
  • 1
  • 48
  • 87
0

From here to help understand %util:

Check the site above because there's an example or two that the following text from the same page, references.

%util: This number depicts the percentage of time that the device spent in servicing requests. %util can be calculated as (r/s + w/s) * svctim / 1000ms * 100 => 1025*0.96/1000 * 100 => 98.5% This simply means that in a 1 second interval, 1025 requests were sent to disk, each of which took 0.96ms for the disk to process resulting in 984 ms of disk utilization time in a period of 1 s (or 1000 ms). This means the disk is greater than 98% utilized

In the example the total number of reads and writes issued per second is 611 + 414 => 1025. Each request takes 0.96 ms to process. Therefore 1025 requests would take 1025 x 0.96 => 984 ms to process. So out of the 1 second that these requests were sent to the device in, 984 ms were taken to process the requests. This means the device utilization is 984/1000 * 100 => ~98.4%. As you can see in the above iostat output the %util does show ~ 98.5%

This should help provide you with a better understanding of what you're viewing so you can take appropriate action as needed.

-Brendan

bmurtagh
  • 763
  • 2
  • 6
  • 13