Linux Monitoring and Analysis combat-1

Source: Internet
Author: User
Tags cpu usage high cpu usage

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

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.