Chapter 2. Monitoring and benchmark tools 49
Draft Document for Review May 4, 2007 11:35 am 4285ch02.fm
tps The number of transfers per second (I/O requests per second) to the device.
Multiple single I/O requests can be combined in a transfer request, because
a transfer request can have different sizes.
Blk_read/s, Blk_wrtn/s
Blocks read and written per second indicate data read from or written to the
device in seconds. Blocks may also have different sizes. Typical sizes are
1024, 2048, and 4048 bytes, depending on the partition size. For example,
the block size of /dev/sda1 can be found with:
dumpe2fs -h /dev/sda1 |grep -F "Block size"
This produces output similar to:
dumpe2fs 1.34 (25-Jul-2003)
Block size: 1024
Blk_read, Blk_wrtn
Indicates the total number of blocks read and written since the boot.
The iostat can take many options. The most useful one is -x option from the performance
perspective. It displays extended statistics. The following is sample output.
Example 2-12 iostat -x extended statistics display
[root@lnxsu4 ~]# iostat -d -x sdb 1
Linux 2.6.9-42.ELsmp (lnxsu4.itso.ral.ibm.com) 03/18/2007
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sdb 0.15 0.00 0.02 0.00 0.46 0.00 0.23 0.00 29.02 0.00 2.60 1.05 0.00
rrqm/s, wrqm/s
The number of read/write requests merged per second that were issued to
the device. Multiple single I/O requests can be merged in a transfer request,
because a transfer request can have different sizes.
r/s, w/s The number of read/write requests that were issued to the device per
second.
rsec/s, wsec/sThe number of sectors read/write from the device per second.
rkB/s, wkB/s The number of kilobytes read/write from the device per second.
avgrq-sz The average size of the requests that were issued to the device. This value is
is displayed in sectors.
avgqu-sz The average queue length of the requests that were issued to the device.
await Shows the percentage of CPU utilization that was taken up while executing at
the system level (kernel).
svctm The average service time (in milliseconds) for I/O requests that were issued
to the device.
%util Percentage of CPU time during which I/O requests were issued to the device
(bandwidth utilization for the device). Device saturation occurs when this
value is close to 100%.
It may be very useful to calculate the average I/O size in order to tailor a disk subsystem
towards the access pattern. The following example is the output of using iostat with the -d
and -x flag in order to display only information about the disk subsystem of interest: