Use Iostat to view disk usage

Source: Internet
Author: User
Tags disk usage

Ⅰ, Iostat installation
[[email protected]_42_63_centos ~]# yum install -y sysstat
Ⅱ, play a hand
[[email protected]_42_63_centos ~]# iostat -xm 3Linux 3.10.0-514.21.1.el7.x86_64 (VM_42_63_centos)  06/28/2018  _x86_64_    (1 CPU)avg-cpu:  %user   %nice %system %iowait  %steal   %idle           0.41    0.00    0.25    0.35    0.00   98.98Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %utilvda               0.00     4.53    0.43    5.42     0.01     0.06    24.09     0.47   79.51   33.78   83.15   1.39   0.81scd0              0.00     0.00    0.00    0.00     0.00     0.00    17.45     0.00    2.68    2.68    0.00   2.53   0.00
2.1 CPU Indicator
- Description
%user Percentage of CPU time in user mode
%nice Percentage of CPU time in user mode with nice value
%system Percentage of time the CPU is in system mode
%iowait Percentage of CPU waiting IO completion time
%steal The percentage of unintentional wait time for a virtual CPU when the hypervisor maintains a second processor
%idle Percent of CPU
    • %iowait value is too high, indicating that there is an I/O bottleneck on hard disk;
    • %idle high value, indicating that the CPU is idle, if the%idle value is high but the system response is slow, it is possible that the CPU waits to allocate memory, should increase the memory capacity at this time
    • If the%idle value continues to be low, the CPU processing power of the system is relatively low, indicating that the most important resource to be addressed in the system is the CPU
2.2 Device Indicators
- Description
rrqm/s Number of read operations per second of merge (read request merge)
wrqm/s Number of write operations per second of merge
r/s Number of read I/O devices completed per second
w/s Number of write I/O devices completed per second
rmb/s Use bandwidth (throughput) to represent read-write scenarios
wmb/s -
Avgrq-sz The average request size per second
Avgqu-sz Average I/O queue depth, HDD may be around 4, SSD can reach about 30
Await Average Per Device I/O operation wait Time (MS)
R_await Waiting time to read
W_await Write the wait Time
Svctm Average service time Per device I/O operation (MS)
%util How much time per second is spent on I/O operations, which is the percentage of CPU consumed by IO

Merge combines IO requests from several contiguous addresses to improve IO efficiency

r/s + w/s = IOPS

Avgrq-sz is actually the number of sectors read per second, each sector is fixed to 512bit on disk, this value multiplied by 512 is the bandwidth (rmb/s+wmb/s), it can be said that the average requested block size per second

    • %util close to 100%, indicating that there are too many I/O requests, I/O system is full load, the disk may have bottlenecks (not necessarily, need to combine AVGRQ-SZ analysis)
    • SVCTM is closer to await, indicating I/O has almost no waiting time;
    • The await is much larger than SVCTM, which indicates that the I/O queue is too long and the IO response is too slow, and necessary optimizations need to be made.
    • Avgqu-sz is larger, also indicates that there is equivalent IO waiting

Use Iostat to view disk usage

Related Article

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.