Objective
The main purpose of performance tuning is to enable the system to effectively utilize various resources and maximize the performance convergence between applications and systems, so that applications can operate efficiently and stably. However, there is no strict definition of the criteria for measuring the utilization of system resources, and there is no unified view of different systems and applications.
Systematic performance We are concerned about: memory, disk, CPU, system load
First, the system load load:1. How to view system load:
Top, uptime
2. System Load Analysis
top-06:43:59 up + days, 6:41, 2 users, load average:0.65, 0.57, 0.50
Represents the average number of processes in a process queue in the past 1 minutes, 5 minutes, and 15 minutes.
The size of the three values of the load average output cannot be greater than the number of system logical CPUs.
For example: The system has 4 logical CPUs (we often say 4 cores), if the load average three values longer than 4 o'clock, indicating that the CPU is busy, high load, will affect the performance of the system, but occasionally more than 4 o'clock, generally does not affect the performance of the system.
If the output value of load average is less than the number of CPUs, the CPU is more idle.
Second, the system CPU1. Viewing system CPU Usage
Top
2.CPU usage Analysis
%CPU (s): 6.0 us, 0.5 sy, 0.0 ni, 92.4 ID, 1.1 wa, 0.0 hi, 0.0 si, 0.0th
US: Indicates the percentage of time that the CPU is in user mode
Sy: Indicates the percentage of time that the CPU is in system mode
ID: Indicates CPU idle rate
WA: Indicates the percentage of CPU waiting for input and output completion time
Si: A page import that represents virtual memory, swap disk swap to RAM
ST: a page export that represents virtual memory, that is, swapping from RAM to swap DISK
Third, the system performance analysis standard
Judging criteria |
Factors affecting system performance |
Good |
Bad |
Bad |
Cpu |
user% + sys% < 70% |
user% + sys% = 85% |
user% + sys% >= 90% |
Memory |
Swap in (SI) =0 Swap out (SO) =0 |
Per CPU with ten page/s |
More swaps in & swaps out |
Disk |
iowait% < 20% |
iowait% = 35% |
iowait% >= 50% |
Part of the content of the "high-performance Linux server Building Combat"
Linux System Performance Analysis