Você pode usar iostat -x
e verificar a coluna await
- por dispositivo, mostra o tempo total gasto em espera, além da manipulação real da solicitação pelo disco. As unidades aqui são milissegundos.
$ iostat -yzx 5
Linux 2.6.32-642.13.1.el6.x86_64 (vagrant1) 04/01/2017 _x86_64_ (1 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.00 0.00 0.20 0.00 0.00 99.80
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0.00 0.20 0.00 2.20 0.00 19.24 8.73 0.00 2.00 0.00 2.00 0.45 0.10
dm-0 0.00 0.00 0.00 2.40 0.00 19.24 8.00 0.01 2.17 0.00 2.17 0.42 0.10
Você também pode usar sar -d
. Novamente, a coluna await
mostra a latência da solicitação média em ms.
$ sar -d
04:50:01 PM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util
05:00:01 PM dev8-0 0.12 0.00 0.92 7.67 0.00 1.21 0.90 0.01
05:00:01 PM dev253-0 0.12 0.00 0.92 8.00 0.00 1.45 0.94 0.01
05:00:01 PM dev253-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
05:10:01 PM dev8-0 0.14 0.00 1.07 7.90 0.00 1.05 0.80 0.01
05:10:01 PM dev253-0 0.13 0.00 1.07 8.00 0.00 1.18 0.81 0.01
05:10:01 PM dev253-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
05:20:01 PM dev8-0 0.11 0.00 0.79 7.26 0.00 1.52 1.05 0.01
05:20:01 PM dev253-0 0.10 0.00 0.79 8.00 0.00 2.19 1.15 0.01
05:20:01 PM dev253-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
05:30:01 PM dev8-0 0.12 0.00 0.97 7.89 0.00 1.22 0.93 0.01
05:30:01 PM dev253-0 0.12 0.00 0.97 8.00 0.00 1.42 0.95 0.01
05:30:01 PM dev253-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
05:40:01 PM dev8-0 0.12 0.00 0.84 7.20 0.00 0.96 0.77 0.01
05:40:01 PM dev253-0 0.11 0.00 0.84 8.00 0.00 1.19 0.86 0.01
05:40:01 PM dev253-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
05:50:01 PM dev8-0 0.11 0.00 0.84 7.75 0.00 1.31 0.94 0.01
05:50:01 PM dev253-0 0.11 0.00 0.84 8.00 0.00 2.03 0.97 0.01
05:50:01 PM dev253-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00