Thursday 12 December 2013

understanding iostat

understanding iostat

 The "iostat" command shows average cpu time since the system was stared (similar to uptime0. It also creates a report of the activites of the disk sub system of the server in two parts:
( cpu utilization and device utilization. )



The CPU utilization report has four sections:

 %user: shows the percentage of cpu utilization that was taken up while executing at the user level applications.

 %nice: shows the percentages of cpu utilization that was taken up while executing at the user level with a nice priority.

 %sys: Shows the percentage of CPU utilization that was taken up while executing at the system level (kernel)

 %idel: shows the percentage of time the cpu was idle.


The Device utilization report has these sections:

 Device: The name of the block device.

 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 of transfer request can have different size.

 Blk_read/s, Blk_write/s: Blocks read and written per second indicate data read from or written to the device in seconds. Block can also have different sizes. Typical sizes are 1024, 2048 and 4096 bytes, depending on the partition size.

 # dumpe2fs -h /dev/sda1 | grep -F "Block size"

 Blk_read, Blk_wrtn: Indicates the total number of blocks read and written since the boot.


The "iostat" can use many options, the most useful one is "-x" option from the performance prespective.




#iostat -d -x sdb1

 rrpm/s, wrpm/s: The number of read/write requests merged per second that were issued to the device. Multiple single I/O requests can be mearged  in a transfer request, because a transfer request can have different size.


 r/s, w/s: The # of read/write requests that were issued to the device per seconds.

 rsec/s, wsec/s: The 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 displayed in sectors.

 avgqu-sz: The average queue leangth of the request that were issued to the device.

 await: show the percentage of cpu utilization that was used while executing at the system level (kernel)

 svctm: The average service time (In miliseconds) for I/O requests that were issued to the device.

 %utils: percentage of cpu time during which I/O requests were issued to the device (band width) utilization for the device). Device saturation occurs when this value is close to 100%













No comments:

Post a Comment