IBM REDP-4285-00 User Manual

Page of 170
4285ch03.fm
Draft Document for Review May 4, 2007 11:35 am
86
 
Linux Performance and Tuning Guidelines
Example 3-2   vmstat output
[root@x232 root]# vmstat 2
r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
 2  1      0   9004  47196 1141672    0    0     0   950  149    74 87 13  0  0
 0  2      0   9672  47224 1140924    0    0    12 42392  189    65 88 10  0  1
 0  2      0   9276  47224 1141308    0    0   448     0  144    28  0  0  0 100
 0  2      0   9160  47224 1141424    0    0   448  1764  149    66  0  1  0 99
 0  2      0   9272  47224 1141280    0    0   448    60  155    46  0  1  0 99
 0  2      0   9180  47228 1141360    0    0  6208 10730  425   413  0  3  0 97
 1  0      0   9200  47228 1141340    0    0 11200     6  631   737  0  6  0 94
 1  0      0   9756  47228 1140784    0    0 12224  3632  684   763  0 11  0 89
 0  2      0   9448  47228 1141092    0    0  5824 25328  403   373  0  3  0 97
 0  2      0   9740  47228 1140832    0    0   640     0  159    31  0  0  0 100
iostat command
Performance problems can be encountered when too many files are opened, being read and 
written to, then closed repeatedly. This could become apparent as seek times (the time it 
takes to move to the exact track where the data is stored) start to increase. Using the iostat 
tool, you can monitor the I/O device loading in real time. Different options enable you to drill 
down even farther to gather the necessary data.
Example 3-3 shows a potential I/O bottleneck on the device /dev/sdb1. This output shows 
average wait times (await) of about 2.7 seconds and service times (svctm) of 270 ms.
Example 3-3   Sample of an I/O bottleneck as shown with iostat 2 -x /dev/sdb1
[root@x232 root]# iostat 2 -x /dev/sdb1
avg-cpu:  %user   %nice    %sys   %idle
          11.50    0.00    2.00   86.50
Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz 
avgqu-sz   await  svctm  %util
/dev/sdb1  441.00 3030.00  7.00 30.50 3584.00 24480.00  1792.00 12240.00   748.37   
101.70 2717.33 266.67 100.00
avg-cpu:  %user   %nice    %sys   %idle
          10.50    0.00    1.00   88.50
Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz 
avgqu-sz   await  svctm  %util
/dev/sdb1  441.00 3030.00  7.00 30.00 3584.00 24480.00  1792.00 12240.00   758.49   
101.65 2739.19 270.27 100.00
avg-cpu:  %user   %nice    %sys   %idle
          10.95    0.00    1.00   88.06
Device:    rrqm/s wrqm/s   r/s   w/s  rsec/s  wsec/s    rkB/s    wkB/s avgrq-sz 
avgqu-sz   await  svctm  %util
/dev/sdb1  438.81 3165.67  6.97 30.35 3566.17 25576.12  1783.08 12788.06   781.01   
101.69 2728.00 268.00 100.00
For a more detailed explanation of the fields, see the man page for iostat(1).