Interpretation of Vmstat and Iostat in Linux

Source: Internet
Author: User


1, Vmstat

Shortly after it was started, even though the incremental report was collected, the first line of values showed the average since the system started, and the second line began to show what is happening now.

Procs

R This column shows how many processes are waiting for the cpu,b column to show how much process is in this interruptible hibernation (usually means they are waiting for I/O, such as disk, network, user input, and so on).
Memory
The SWPD column shows how many blocks have been switched out to disk (page swapping). The remaining three columns show how many blocks are idle (unused), how many blocks are used as buffers, and how many are being cached by the operating system.
Swap
These columns show the paging activity: how many blocks per second are being swapped in (from disk) and swapped out (to disk). They are more important than health swpd. Most of the time we like to see that the SI and so columns are 0, and we definitely don't want to see more than 10 blocks in seconds. Sudden peaks are just as bad.
Io
These columns show how many blocks are read from the block device (BI) and written out (Bo). This usually reflects disk I/O.
System
These columns show the number of seconds of interruption (in) and context switching (CS).
Cpu
These columns show the percentage of all CPU time spent on various operations, including executing user code (not kernel), executing system code (kernel), idle, and waiting for I/O. If you are using virtualization, the fifth column may be St, showing the percentage of "stolen" from the virtual machine. This relates to the time that the virtual machine wants to run but the hypervisor runs other objects. If the virtual machine does not want to run any objects, but the hypervisor runs other objects This is not a stolen CPU time.
Vmstat's output is related to the system, see Vmstat (8) specifically. An important tip is: memory, swap area, already I/O system is block number rather than byte, in Gnu/linux, block size is usually 1024 bytes.

2, Iostat

As with Vmstat, the first line of reports shows the average since the system started.
rrqm/s and wrqm/s
Merge read and write requests per second. "Merged" means how many logical requests the operating system takes from the queue to merge into a single request to the actual disk.
r/s and w/s
Read and write requests sent to the device per second. The number of slices read and written by
Rsec/s and wsec/s
per second. Game systems are also exported as rkb/s and wkb/s, meaning the number of kilobytes per second read and write.
Avgrq-sz
The number of sectors per request. The number of requests that
Avgqu-sz
waits in the device queue. The number of milliseconds spent on the
await
Disk queue, but no independent statistics read and write requests. The number of milliseconds spent by the
SVCTM
Service request, excluding the queue time. The percentage of time that
%util
has at least one active request. If you are familiar with the criteria for utilization in the queue theory, then this command is baffling. It is not actually a block device utilization. Devices that have more than one disk (such as a RAID controller) can support higher than a single hard disk device. But%util never exceeds 100% unless there is a rounding error in the technology. Therefore, this metric does not truly reflect the utilization of the device, actually contrary to what the document says, unless there is a special example of a single physical disk. The
can infer some facts about the machine I/O subsystem with IOSTAT output. An important metric Division requests concurrent number of services. Because the unit of reading and writing is 1 per thousand seconds per second and the unit of service time, all can use the Littler law to get the following formula to compute the concurrent request of the device service:
concurrency = (r/s + w/s) * (svctm/1000)

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.