Several ways to view disk IO overhead for Linux

Source: Internet
Author: User
Tags memory usage sleep cpu usage

How can I quickly navigate to concurrent high because of the large disk IO overhead? There are three ways to:

 The first: Using CPU information in the top command to observe

The CPU information that top can see is:

The code is as follows:

tasks:29 Total, 1 running, sleeping, 0 stopped, 0 zombie

Cpu (s): 0.3% us, 1.0% sy, 0.0% ni, 98.7% ID, 0.0% wa, 0.0% Hi, 0.0% si

The specific explanations are as follows:

Total Process tasks:29

1 running number of processes running

Number of sleeping sleep processes

0 stopped number of processes stopped

0 Zombie Zombie Process number

Cpu (s):

0.3% US user space consumption CPU percent

1.0% sy kernel space occupies CPU percent

0.0% ni% of processes in user process space that have changed priority

98.7% ID Idle CPU percent

0.0% wa% CPU time waiting for input output

0.0% hi

0.0% si

The percentage of 0.0% WA can roughly reflect the frequency of current disk IO requests. If the number of WA is relatively large, it indicates that there are more IO waiting for input and output.

  The second type: using Vmstat

The Vmstat command reports statistical information about threads, virtual memory, disks, traps, and CPU activity. Reports generated by the Vmstat command can be used to balance system load activities. The system-wide statistics (in all processors) calculate the average as a percentage, or calculate the sum.

Enter command:

The code is as follows:

Vmstat 2 5

If you find that the waiting process and the number of processes in the non-interrupted sleep state are very large, and the number of blocks sent to the block and the number of blocks received from the block device is very high, then disk IO is more.

Vmstat parameter Explanation:


R: Number of processes waiting to run B: number of processes in a non-disruptive sleep state w: The number of running processes that are swapped out. This number is calculated by Linux, but Linux does not run out of swap space


SWPD: Virtual memory usage, unit: KB

Free: idle memory, per kb

Buff: The amount of memory that is used as a cache, in kilobytes: KB


Si: The number of swap pages exchanged from disk to memory, in units: kb/seconds

So: number of swap pages from memory to disk, in units: kb/seconds


BI: Number of blocks sent to the block unit: block/sec

Bo: Number of blocks received from block devices, in units: Block/sec


In: Number of interrupts per second, including clock interrupts

CS: The number of environment (context) switches per second


Show by percent of total CPU usage

Us:cpu Use time

SY:CPU System Usage Time

ID: Idle Time


More Vmstat Use information

 The third type: using Iostat


Iostat is a tool for the Sysstat toolset and needs to be installed.

The CentOS is installed in the following ways:

The code is as follows:

Yum Install Sysstat

Ubuntu is installed in the following ways:

The code is as follows:

Aptitude Install Sysstat


IOSTAT-DX Display disk extension information

root@fileapp:~# IOSTAT-DX

R/S and w/s are read and write operations per second, while the rkb/s and WKB/S columns display the amount of read and write data per second in kilobytes

If these two pairs of data values are high, the disk IO operation is very frequent.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.