Linux disk I/O view (iostat)

Source: Internet
Author: User

##############
#
# Operation
#
##############
# Iostat-x 1 10
Linux 2.6.18-92. el5xen 02/03/2009
Avg-cpu: % user % nice % system % iowait % steal % idle
1.10 0.00 4.82 39.54 0.07 54.46
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm % util
Sda 0.00 3.50 0.40 2.50 5.60 48.00 18.48 0.00 0.97 0.97 0.28
Sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sdd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sde 0.00 0.10 0.30 0.20 2.40 2.40 9.60 0.00 1.60 1.60 0.08
Sdf 17.40 0.50 102.00 0.20 12095.20 5.60 118.40 0.70 6.81 2.09 21.36
Sdg 232.40 1.90 379.70 0.50 76451.20 19.20 201.13 4.94 13.78 2.45 93.16

##############
#
# Note
#
##############
Rrqm/s: the number of merge read operations per second. That is, delta (rmerge)/s.
Wrqm/s: Number of write operations performed on merge per second. That is, delta (wmerge)/s
R/s: The number of read I/O devices completed per second. That is, delta (rio)/s.
W/s: the number of write I/O devices completed per second. That is, delta (wio)/s
Rsec/s: Number of read sectors per second. That is, delta (rsect)/s
Wsec/s: Number of write sectors per second. That is, delta (wsect)/s
RkB/s: the number of K Bytes read per second. It is half of rsect/s and the size of each slice is 512 bytes. (calculation required)
WkB/s: the number of K bytes written per second. Half of wsect/s (to be calculated)
Avgrq-sz: average data size (slice) of each device I/O operation. delta (rsect wsect)/delta (rio wio)
Avgqu-sz: Average I/O queue length, that is, delta (aveq)/s/1000 (aveq in milliseconds ).
Await: average wait time for each device I/O operation (MS). That is, delta (ruse wuse)/delta (rio wio)
Svctm: Average service time per device I/O operation (MS). That is, delta (use)/delta (rio wio)
% Util: the percentage of time in one second for I/O operations, or the number of I/O queues in one second is not empty. that is, delta (use)/s/1000 (use is measured in milliseconds)

##############
#
# Analysis
#
##############
1. If % util is close to 100%, it indicates that too many I/O requests are generated and the I/O system is fully loaded. This disk may have a bottleneck.
2. If the idle is less than 70% I/O, the load will be high. Generally, the read speed is wait.
3. You can also view the parameters B (number of processes waiting for resources) and wa in combination with vmstat (percentage of CPU time occupied by I/O wait, higher than 30% when I/O pressure is high)
4. For more information, see
Generally, svctm is smaller than await (the wait time for the waiting request is calculated repeatedly). The size of svctm is generally related to disk performance, and the CPU/memory load will also affect it, too many requests may indirectly increase the svctm. the size of await generally depends on the service time (svctm), the length of the I/O queue, and the mode in which I/O requests are sent. if svctm is close to await, it means that I/O has almost no waiting time. If await is much larger than svctm, it means that the I/O queue is too long and the response time of the application is slow, if the response time exceeds the allowable range, you can consider replacing a faster disk, adjusting the kernel elevator algorithm, optimizing the application, or upgrading the CPU.
The queue length (avgqu-sz) can also be used as an indicator to measure the system I/O load,

##############
#
# Operation
#
##############
# Iostat-x 1 10
Linux 2.6.18-92. el5xen 02/03/2009
Avg-cpu: % user % nice % system % iowait % steal % idle
1.10 0.00 4.82 39.54 0.07 54.46
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm % util
Sda 0.00 3.50 0.40 2.50 5.60 48.00 18.48 0.00 0.97 0.97 0.28
Sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sdd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sde 0.00 0.10 0.30 0.20 2.40 2.40 9.60 0.00 1.60 1.60 0.08
Sdf 17.40 0.50 102.00 0.20 12095.20 5.60 118.40 0.70 6.81 2.09 21.36
Sdg 232.40 1.90 379.70 0.50 76451.20 19.20 201.13 4.94 13.78 2.45 93.16

##############
#
# Note
#
##############
Rrqm/s: the number of merge read operations per second. That is, delta (rmerge)/s.
Wrqm/s: Number of write operations performed on merge per second. That is, delta (wmerge)/s
R/s: The number of read I/O devices completed per second. That is, delta (rio)/s.
W/s: the number of write I/O devices completed per second. That is, delta (wio)/s
Rsec/s: Number of read sectors per second. That is, delta (rsect)/s
Wsec/s: Number of write sectors per second. That is, delta (wsect)/s
RkB/s: the number of K Bytes read per second. It is half of rsect/s and the size of each slice is 512 bytes. (calculation required)
WkB/s: the number of K bytes written per second. Half of wsect/s (to be calculated)
Avgrq-sz: average data size (slice) of each device I/O operation. delta (rsect wsect)/delta (rio wio)
Avgqu-sz: Average I/O queue length, that is, delta (aveq)/s/1000 (aveq in milliseconds ).
Await: average wait time for each device I/O operation (MS). That is, delta (ruse wuse)/delta (rio wio)
Svctm: Average service time per device I/O operation (MS). That is, delta (use)/delta (rio wio)
% Util: the percentage of time in one second for I/O operations, or the number of I/O queues in one second is not empty. that is, delta (use)/s/1000 (use is measured in milliseconds)

##############
#
# Analysis
#
##############
1. If % util is close to 100%, it indicates that too many I/O requests are generated and the I/O system is fully loaded. This disk may have a bottleneck.
2. If the idle is less than 70% I/O, the load will be high. Generally, the read speed is wait.
3. You can also view the parameters B (number of processes waiting for resources) and wa in combination with vmstat (percentage of CPU time occupied by I/O wait, higher than 30% when I/O pressure is high)
4. For more information, see
Svctm is generally smaller than await (system I/O load indicators,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.