Linux is an open source system whose core is responsible for managing the system's processes, memory, device drivers, files and network systems, which determine the performance and stability of the system. Because the kernel source code is easy to get, anyone can add to it what they think is good. Linux provides many services by default, how to maximize the performance of Linux, and how to streamline the system to fit your current business needs, which requires the kernel to be recompiled and optimized. There are many factors that affect Linux performance, from the underlying hardware to the upper-level application, where each part can be optimized. Linux performance evaluation and analysis tools have many factors that affect Linux server performance, from the underlying hardware to the operating system, from network applications to upper-level applications. Finding the balance between system hardware and software resources is key. such as the rapid increase in traffic, resulting in high CPU utilization, due to the inability to respond in a timely manner, the system load has risen sharply, resulting in other cities to run too slow, more and more processes in the system, may lead to physical memory exhaustion, until the swap memory is exhausted, the system is already in suspended animation, resulting in the system can not log in , only a restart operation can be performed to recover. Although the bottleneck of system power in most cases is caused by application bugs or poor performance, the end result is a higher system load, slow program response or denial of service, so to understand the current performance of the system, you should first observe the system load or CPU usage. There are a lot of command tools to view and monitor the CPU, there are many common uptime,top,vmstat and so on. The output of the uptime can be used as a reference for overall performance evaluation of Linux systems. The main concern here is the load average parameter, with 3 values representing the system load values for the last 1 minutes, 5 minutes, and 15 minutes, respectively. The value of this section can refer to the number of CPUs or the number of cores, information about the CPU can be viewed in the system,/proc/cpuinfo file. such as 5 minutes of load value or 15 minutes of load value longer than twice times the number of CPUs, indicating that the system is currently in high load, need attention and optimization, such as the number of long-term lower than the number of CPUs or the number of cores, indicating that the system is operating normally, such as the long-term value of 1 below the system CPU resources are The CPU is in an idle state. Vmstat is a comprehensive profiling tool that allows you to observe the status of processes, memory usage, swap usage, disk IO,CPU usage, and more. Procs The first column represents the number of processes running and waiting for the CPU time slice, which is longer than the number of system CPUs, indicating that the CPU is low and needs to be increased. The second column, B, indicates the number of processes waiting on the resource, waiting for the resource to have IO or memory exchange, etc. Memory-related commands also have free, disk IO-related iostat
Linux performance evaluation and analysis tools