Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Linux performance monitoring study notes www.2cto. comLinux performance monitoring is generally divided into these aspects: 1. CPU2.Memory3. IO4.Network these four aspects are independent of each other but affect each other. Common performance monitoring tools: * vmstat: All-Around * mpstat: CPU * sar :... linux performance monitoring study notes www.2cto.com Linux performance monitoring is generally divided into these aspects: 1. CPU 2. memory 3. IO 4. the four aspects of Network are independent of each other, but they affect each other. Common performance monitoring tools: * vmstat: * mpstat: CPU * sar: * iostat: disk * netstat: Network * dstat: aggregation * iptraf: Network * netperf: bandwidth * ethtool: network * iperf: Network * tcptrace: packet analysis CPU priority: interrupt> kernel process> Context switch (Context Switches): the process of CPU switching between processes. Run Queue: Linux runs various processes through certain scheduling algorithms. the processes to be Run are stored in the Run Queue, the concept of load is the total length of the Run Queue plus the number of running processes. CPU usage: * User Time: Time used by the process in the User space * System Time: Time used by the kernel process * Wait IO: Time waiting for IO * Idle: idle time judgment criteria: * The Run Queue of each CPU core should not exceed 1 ~ 3 * when the CPU is fully used, the User Time accounts for about 65% ~ 70%, System Time accounts for about 30% ~ 35%, about 0% of Idle ~ 5% Example 1: Many cs, low Interupt and high Wait Time indicate that the process is generally waiting for hardware response Example 2: There are not many cs, high Interupt, and high User Time, it indicates that the Memory of a process waiting for the hardware response www.2cto.com Memory is in the unit of page. The daemon kswapd is responsible for ensuring that there is idle Memory available. Kswapd does the following: * If the page is not modified, it is put into the idle memory linked list. * The page is modified and corresponds to a file in the file system, write it to the disk. * The page is modified, but it is not written to a file in the file system; the pdflush daemon is responsible for synchronizing dirty pages to the disk for memory usage, as long as you do not need to use swap. If the file is not in the memory cache, the Major Page Fault (MPF) is triggered. at this time, the kernel reads the file from the disk and caches it in the memory, if the same content is required next time, the Minor Page Fault (MnPF) is triggered and read directly from the memory. IO is the slowest part in the computer. Generally, the WaitTime of the CPU is high, and the context switch is much higher than interupt, which indicates that the system IO is the bottleneck. For the network, various tools are used to detect and set network parameters. For non-LAN networks, the network environment is very complex and needs to be analyzed in detail.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
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.