Linux disk I/O status detection

Source: Internet
Author: User


Linux disk I/O status checks the performance of the Linux system. Generally, you can use top. iostat, vmstat, and other commands to locate the problem. Iostat can provide us with a wealth of IO status data. Result Analysis of www.2cto.com iostat [kefu @ SZ-8 linux] $ iostat-x-k Linux 2.6.18-128. el5_cyou_1.0 (SZ-8.30) 09/08/2011 avg-cpu: % user % nice % system % iowait % steal % idle 16.58 0.00 2.79 0.46 0.00 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm % util sda 0.06 29.28 0.22 37.14 10.21 265.68 14.77 0.02 0.51 0.15 0.55 sda1 0.00 0.00 0.00 0.00 0.00 0.00 10.79 0.00 2.66 2.43 0.00 sda2 0.0 1 0.78 0.10 0.36 0.81 4.58 23.51 0.00 1.21 0.84 0.04 sda3 0.03 15.17 0.09 35.39 8.98 202.24 11.91 0.01 0.26 0.12 0.44 sda4 0.00 0.00 0.00 0.00 0.00 0.00 2.00 0.00 33.33 sda5 33.33 0.00 0.01 1.59 0.03 0.51 0.34 8.40 32.20 0.00 1.19 0.58 0.03 sda6 0.00 0.00 0.00 0.12 0.00 0.48 8.18 0.00 5.02 4.53 0.05 sda7 0.00 0.00 0.00 0.00 0.00 0.00 45.00 0.00 sda8 5.52 3.04 0.00 0.00 0.00 0.00 0.00 0.00 0.00. 88 0.00 7.62 6.03 0.00 sda9 0.00 0.00 0.00 0.00 0.00 0.00 39.71 0.00 7.37 5.83 0.00 sda10 0.00 0.00 0.00 0.00 0.00 0.00 37.57 0.00 sda11 5.70 3.54 0.00 0.00 11.74 0.01 0.76 0.08 49.97 131.48 0.01 10.74 0.57 0.04 sdb 0.01 3.91 20.24 20.21 1262.95 1853.94 154.09 0.52 12.84 1.97 7.95 rrqm/s: the number of merge read operations per second. That is, delta (rmerge)/swrqm/s: Number of merge write operations per second. Delta (wmerge)/sr/s: the number of read I/O devices per second. That is, delta (rio)/sw/s: the number of write I/0 devices completed per second. That is, delta (wio)/srsec/s: Number of read sectors per second. That is, delta (rsect)/swsec/s: Number of write sectors per second. That is, delta (wsect)/srKB/s: the number of read K bytes per second. It is half of rsec/s, because the size of each slice is 512 bytes wKB/s: the number of K bytes written per second. Half of wsec/s avgrq-sz: average data size (slice) of each device I/O operation ). That is, delta (rsect + wsect)/delta (rio + wio) avgqu-sz: Average I/O queue length. That is, delta (aveq)/s/1000 (because aveq is measured in milliseconds) await: average wait time (in milliseconds) for each device I/O operation ). 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 (usr)/s/1000 (because the Unit of use is millisecond) 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. Important parameter % util: the percentage of time in one second for I/O operations, or the amount of time in one second for I/O queues is non-empty svctm: average service time for each device I/O operation await: average wait time for each device I/O operation avgqu-sz: Average I/O queue length if % util is close to 100%, it indicates that there are too many I/O requests, the I/O system is fully loaded, and the disk may have a bottleneck. Generally, if % util is greater than 70%, the I/O pressure is relatively high, the read speed is wait. At the same time, you can view the parameters B (number of processes waiting for resources) and wa with vmstat (percentage of CPU time occupied by I/O wait, which is higher than 30% when I/O pressure is high) 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. Image metaphor r/s + w/s is similar to the total number of payers average queue length (avgqu-sz) is similar to the average number of people queuing in a unit of time average service time (avctm) similar to cashier's receipt speed average wait time (await) similar to average person's wait time average I/O data (avgrq-sz) similar to the average I/O operation rate (% util) similar to the time ratio of some people queuing before the receiving station, svctm is generally smaller than await (because the wait time of the waiting request is calculated repeatedly), and the size of svctm is generally related to disk performance, the CPU/memory load will also affect it, and too many requests will indirectly lead to the increase of 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 changing the faster disk, adjusting the kernel elevator algorithm, optimizing the application, or upgrading the CPU queue length (avcqu-sz) it can also be used as an indicator to measure the system I/O load. However, avcqu-sz is based on the average per unit time, so it cannot reflect the instantaneous I/O flood.

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.