Monitoring overview and 5 major indicators
- Cpu
- MEM Memory
- IO disk interaction
- Load loads
- Network Networks
- The relationship between them is dependent on each other, and any high load will cause problems in other indicators;
- The high throughput of the NIC may result in more CPU overhead;
- A lot of CPU overhead will try to make more memory use requests;
- A large number of requests from memory and disk can lead to more CPU and IO problems;
Cpu
good: user% + sys% < 70%
General: user% + sys% =85%
Bad: user% + sys% >=90%
For example: 1, if the user% lasts more than 90%, is the program caused;
2, if the sys% lasts more than 90%, is the kernel parameter or the Linux setup problem;
User time: Non-kernel operation consumes CPU (CPU), which lasts more than 90%, it may be that the system uses a large number of algorithms or complex calculations or unreasonable code resulting in a larger value;
SYS time is how long the kernel is consuming CPU (the operating system and the CPU consumed by the Linux kernel itself). If this value goes up, the performance of the whole system is down, it can reflect the situation of the system itself;
Load Average
top Command View
A statistic that is the sum of the number of processes in the data that the CPU is processing + waiting for the CPU to process, that is, the length statistics of the CPU usage queue. The information it contains is not CPU usage, it reflects CPU usage and application status.
Ideal load Average < CPU * Number of cores *0.7
Number of CPUs: grep ' physical id '/proc/cpuinfo | Sort-u
CPU cores: grep ' core ID '/proc/cpuinfo | Sort-u | Wc-l
How to understand the relationship between CPU and load
Low load, high CPU usage----->CPU Usage High description is busy, load low indicates no queuing phenomenon;
Load high, low CPU usage---->CPU Low usage description is not busy, load high indicates the queuing phenomenon is very serious;
Top command
How to see multi-core?
For multi-core CPUs, CPU 0 is very critical, because the CPU between the core of the dispatch is done through the CPU0, then the CPU 0 load high, will affect the performance of other cores;
Under Windows: Task Manager---> A process Right-click---> Set dependencies
Under Linux: Use the Taskset command to set and limit the process to be run on those cores;
Linux Monitoring and Analysis combat-1