Several ways to view disk IO overhead for Linux

Source: Internet
Author: User
Tags cpu usage

How can I quickly locate the concurrency high due to the large disk IO overhead?

There are three ways of doing this:

 First: Use the CPU information in the top command to observe

Top can see the CPU information is:

Use methods such as:

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/9E/A0/wKiom1mTmovR9AkXAABILijUwik406.png-wh_500x0-wm_ 3-wmp_4-s_1079809476.png "style=" Float:none; "title=" Top.png "alt=" Wkiom1mtmovr9akxaabilijuwik406.png-wh_50 "/>

The specific explanations are as follows:

tasks:29 Total Process Totals

1 running number of running processes

Sleeping the number of sleep processes

0 Number of processes stopped stopped

0 Zombie Number of zombie processes

Cpu (s):

0.3% US user space consumes CPU percentage

1.0% SY core space CPU percent occupied

0.0% CPU Percentage of processes that have changed priority within NI user process space

98.7% ID Idle CPU percent

0.0% wa wait for the input output CPU time percentage

0.0% hi

0.0% si

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


  The second type: with 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 activity. These system-wide statistics (all processors) calculate the average as a percentage, or calculate its sum. 2 is the time interval, 5 is the number of query displays and the default value is 1.

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/9E/A0/wKiom1mTmxrAJZJAAAAsdlawv7o601.png-wh_500x0-wm_ 3-wmp_4-s_3394840026.png "title=" Vmstat.png "alt=" Wkiom1mtmxrajzjaaaasdlawv7o601.png-wh_50 "/>

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

Vmstat parameter Explanation:

Procs

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

Memory

SWPD: Virtual memory usage, unit: KB

Free: idle memory, in kilobytes

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

Swap

Si: Number of swap pages from disk swap to memory, in kb/seconds

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

Io

BI: Number of blocks sent to block device, units: Blocks/sec

Bo: Number of blocks received from a block device, units: Blocks/sec

System

In: Number of interrupts per second, including clock interrupts

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

Cpu

Display as a percentage of total CPU usage

Us:cpu Use time

SY:CPU System Usage Time

ID: Idle Time

Quasi-Test

More Vmstat usage information

 The third type: with Iostat

Installation:

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

The CentOS installation method is:

The code is as follows:

Yum Install Sysstat

The way Ubuntu is installed is:

The code is as follows:

Aptitude Install Sysstat

Use:

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/9E/8E/wKioL1mTnKPBYLi5AAA6GuuajDw639.png-wh_500x0-wm_ 3-wmp_4-s_1837680042.png "title=" Iostat.png "alt=" Wkiol1mtnkpbyli5aaa6guuajdw639.png-wh_50 "/>

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 in kilobytes per second

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

Several ways to view disk IO overhead for Linux

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.