Friday, January 20, 2017

checking the disk performance using iostat

Advertisements

How do we know the disk is creating the issue? Like so much write and reads are happening and disks are not able to perform according to the needs? We can check this with top and iostat command.

First try with top and check whether there is a wait for io devices.

#top -c

top - 11:58:53 up 16 days, 18:29,  1 user,  load average: 0.08, 0.13, 0.09
Tasks: 124 total,   1 running, 123 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,    0.2%sy,    0.0%ni, 98.2%id,  1.4%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   3711248k total,  3562888k used,   148360k free,   183332k buffers
Swap:  3850236k total,   817960k used,  3032276k free,   146796k cached

1.4% is fine. But if you have high I/O wait, then we need to check what is causing the issue.

Now when we run the iostat command.

[root@main ~]# iostat  -x 1
Linux 2.6.32-642.3.1.el6.x86_64 (main)     01/16/2017     _x86_64_    (6 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                   0.39      0.00    0.54       0.80       0.00    98.27

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               1.69     6.66    0.28    1.06    16.99    61.73    58.92     0.03   19.46    0.82   24.29   9.81   1.31
sdb               0.00   142.17    4.73   16.41  1208.15  1268.67   117.15     0.02    0.85    0.20    1.03   1.35   2.85
dm-0              0.00     0.00    0.03    5.49     1.51    43.92     8.23     0.15   26.35    6.36   26.46   2.28   1.26
dm-1              0.00     0.00    1.94    2.23    15.49    17.80     8.00     0.07   17.13    0.38   31.70   0.12   0.05

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                  0.17      0.00      0.33     0.00       0.00      99.50

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    19.00    0.00    3.00     0.00   176.00    58.67     0.06   20.67    0.00   20.67  13.33   4.00
sdb               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
dm-0              0.00     0.00    0.00   22.00     0.00   176.00     8.00     0.39   17.77    0.00   17.77   1.82   4.00
dm-1              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00

No comments:

Post a Comment

Be nice. That's all.