What is the relationship of await, r_await and w_await in iostat -x command?

4

I want to know the relationship of the await, r_await and w_await columns in the output from iostat -x.

Below is an example output of an iostat I/O statistics.

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           7.55    0.01    5.70    7.31    0.00   79.44

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sdq               0.35    14.58   60.61  112.75   789.04  1172.86    22.63     1.45    8.39   17.76    3.35   1.19  20.65
sda               0.01     0.66   65.84   20.44  9450.37  2838.27   284.86     0.04    0.49   18.31   25.28   4.68  40.39

user991704

Posted 2019-01-30T01:41:22.247

Reputation: 41

Answers

2

  • await is the average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

  • r_await is the average time (in milliseconds) for read requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

  • w_await is the average time (in milliseconds) for write requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.

    You can go through the iostat manual for more information regarding the other outputs.

angelofdev

Posted 2019-01-30T01:41:22.247

Reputation: 1 024

A casual reading of this answer (which is quoted directly from the man page) suggests that await should tend to be the average of r_await and w_await.  This is (approximately) true for the first line in the example in the question (the line for sdq), but is not even close to being true for the second line (sda).   Can you explain this? – Scott – 2019-01-30T05:41:34.207

2@Scott No I cannot answer this because it's the OP's example output. I would say that await refers to the request for the read/write to the device once the device receives this read/write request, is when the r_await and w_await kicks in. So it takes 0.04ms for the read/write request to be actioned by the device then 18.31ms on average for a read request to get actioned and compeleted and 25.28ms for a write request. – angelofdev – 2019-01-30T05:49:45.720