Using the Iostat command in Linux systems to detect disk IO performance

Source: Internet
Author: User
Tags disk usage

The Iostat command can provide rich IO performance status data. Iostat can collect and display statistics on system input/output storage devices. Frequently used to track storage device performance issues, including devices, local disks, and remote disks such as NFS.

IOSTAT provides several switches for custom output. The most useful are:

-C shows only CPU rows

-D display device (disk) Usage status

-k displays disk output in kilobytes

-T include timestamp in output

-X includes extended disk metrics in the output

RRQM/S: Number of read operations per second for merge.

wrqm/s: Number of write operations per second for merge.

R/S: Number of Read I/O devices completed per second.

W/S: Number of write I/O devices completed per second.

RSEC/S: Number of sectors read per second.

WSEC/S: Number of sector writes per second.

RKB/S: The number of K bytes read per second. Is half the rsect/s, because each sector size is 512 bytes. (Need to calculate)

WKB/S: The number of K bytes written per second. is half the wsect/s. (Need to calculate)

Avgrq-sz: The average data size (sector) per device I/O operation.

Avgqu-sz: Average I/O queue length.

Await: The average wait time (in milliseconds) for each device I/O operation.

SVCTM: Average service time (in milliseconds) per device I/O operation.

%util: How much of the time is used for I/O operations in a second.

On the interpretation of the merge: When the system calls need to read the data, the VFS will send the request to each FS, if the FS found that different read requests read the same block data, FS will merge this request into the merge

Await: The average time, in milliseconds, to process each IO request. This can be understood as the response time IO, the general system IO response time should be less than 5ms, if more than 10ms is relatively large.

%util: All processing IO time in the statistical time, divided by the total statistic time. For example, if a statistic interval of 1 seconds, the device has 0.8 seconds processing Io, and 0.2 seconds idle, then the device's%util = 0.8/1 = 80%, so this parameter indicates the device's busy level. Generally, if the parameter is 100%, the device is already running at a full load (of course, if it is multiple disks, even if the%util is 100%, disk usage may not be the bottleneck because of the concurrency capability of the disk).

Here are a few SSD cards for the database to use. Look at the actual usage.

The code is as follows:

root@10.1.1.200:~# df-h


The code is as follows:

root@10.1.1.200:~# iostat-d-M 1 5

#参数-D indicates the display device disk usage state;-M uses megabytes as the display unit. 1 5 indicates a refresh every 1 seconds, displaying a total of 5 times.

Linux 2.6.18-6-amd64 (192.168.2.31) 02/16/2016 _x86_64_

TPS: The number of transmissions per second of the device, one transmission means one I/O request, and multiple logical requests will be merged into an I/O request. The size of the request for a transmission is indeterminate.

MB_READ/S: The amount of data read from the device per second.

MB_WRTN/S: The amount of data written to the device per second.

Mb_read: The total amount of data read.

MB_WRTN: Total amount of data written.

The current statistics of the SSD card disk total TPS is 551.49. The volume is still relatively large.

The-x parameter is used below for more statistical information

The code is as follows:

root@10.1.1.200:~# iostat-d-x-m 1 5

Linux 2.6.18-6-amd64 (192.168.2.31) 02/16/2016 _x86_64_

RRQM/S: How many of this device-related read requests per second are being merge.

WRQM/S: How many write requests per second related to this device are being merge.

RMB/S: Number of sectors read per second.

WMB/S: Number of slices written per second.

Await: The average time (in milliseconds) of processing per IO request can be understood as the response time of Io, and the general system IO response time should be less than 5ms, if greater than 10ms.

%util: All processing IO time in the statistical time, divided by the total statistical time. Can be understood as equipment utilization rate

Here you can see the SSD card in the utilization rate of close to 100%, write a lot of data, await response time also remained below 1ms, it seems that performance is good.

You can also use the-C parameter to view the CPU state

The code is as follows:

root@10.1.1.200:~# iostat-c 1 5

Linux 2.6.18-6-amd64 (192.168.2.31) 02/16/2016 _x86_64_

The IO performance-disk IO performance test tool for the
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.