Vmstat usage and description

Source: Internet
Author: User
Tags high cpu usage

650) this. width = 650; "src ="/e/u/themes/default/images/spacer.gif "style =" background-image: url ("http://fengtao.blog.51cto.com/e/u/lang/zh-cn/images/localimage.png"); border: 1px solid # DDDDDD; background-position: 50% 50%; "alt =" spacer.gif "/> 650) this. width = 650; "src =" http://img1.51cto.com/attachment/201310/165931393.jpg "title =" WM84B_13_X4YUIOR2}MCV9C.jpg "alt =" 165931393.jpg"/>

1 indicates refresh once per second, 5 indicates refresh 5 times in total

If you want to keep monitoring, you can specify the refresh time without writing times, and the refresh will not stop.


The following is a description of each column:

R indicates the running Queue (that is, how many processes are actually allocated to the CPU). Currently, the CPU of the server I tested is relatively idle and no program is running. When this value exceeds the number of CPUs, the CPU bottleneck may occur. This is also related to the top load. Generally, when the load exceeds 3, it is relatively high. If the load exceeds 5, it is high. If the load exceeds 10, it is abnormal and the server status is very dangerous. The top load is similar to the running queue per second. If the running queue is too large, it indicates that your CPU is very busy, which may cause high CPU usage.

B Indicates the blocked process.

The size of the swpd virtual memory used. If it is greater than 0, it indicates that the physical memory of the machine is insufficient. If it is not a program memory leak, you should upgrade the memory or migrate the memory-consuming task to another machine.

The size of free physical memory.

The buff Linux/Unix system is used to store the cache of contents and permissions in the directory.

Cache is used directly to remember the files we open and buffer the files. Linux/Unix is clever, and part of the idle physical memory is used as the cache of files and directories, to improve the performance of program execution, buffer/cached is quickly used when the program uses the memory.

The size of the virtual memory read by si from the disk per second. If this value is greater than 0, it indicates that the physical memory is insufficient or the memory is leaked. Find out the memory-consuming process to solve the problem.

So the size of the virtual memory written to the disk per second. If the value is greater than 0, the same as above.

The number of blocks received by bi Block devices per second. The Block devices here refer to all disks and other Block devices in the system. The default block size is 1024 bytes. I have no IO operations on this machine, therefore, it is always 0. on a machine that processes and copies a large amount of data (2-3 TB), we can see that it can reach 14B B/s, and the disk write speed is almost MB per second.

The number of blocks sent by bo Block devices per second. For example, if we read files, bo must be greater than 0. Bi and bo are generally close to 0. Otherwise, IO is too frequent and needs to be adjusted.

The number of CPU interruptions per second in, including time interruptions.

Cs context switching times per second. For example, if we call a system function, context switching is required. For thread switching, process context switching is also required. The smaller the value, the better. The larger the value, the smaller the number of threads or processes. For example, in a web server such as apache and nginx, generally, tests are performed on thousands or even tens of thousands of concurrent threads during performance tests. The process of selecting a web server can be lowered and tested by the process or thread peak, until cs reaches a relatively small value, this process and the number of threads are a more appropriate value. The same is true for system calls. Every time a system function is called, the Code enters the kernel space, resulting in context switching. This consumes resources and avoids frequent calls to system functions. Too many context switches indicate that most of your CPU is wasted on context switches, and the CPU is not fully utilized.

CPU time of the us user. I used to perform encryption and decryption on a server that frequently performed encryption and decryption. We can see that the number of us running queues is close to 100, and the number of r running queues reaches 80. (The Machine is performing a stress test, poor performance ).

If the CPU time of the sy system is too high, it indicates that the system call time is long, such as frequent IO operations.

Id idle CPU time. Generally, id + us + sy = 100. Generally, id indicates idle CPU usage, us indicates user CPU usage, and sy indicates system CPU usage.

Wt waits for the io cpu time.

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.