Understand the load average (graphics) in the Linux system

Source: Internet
Author: User


One, what is load average?

The load on the Linux system is a measure of the current CPU workload (wikipedia:the system load is a measure of the amount of work, a computer system is doing). It is also simple to say the length of the process queue.

Load Average is the average load over a period of time (1 minutes, 5 minutes, 15 minutes).

We can view the current load average situation by the system command "W"

[Email protected] ~]# W
20:01:55 up days, 8:20, 6 users, load average:1.30, 1.48, 1.69

The above content shows the system load is "1.30, 1.48, 1.69", what do these 3 values mean?

    • First bit 1.30: Indicates the last 1 minutes average load
    • Second bit 1.48: Indicates the last 5 minutes average load
    • Third digit 1.69: Indicates the last 15 minutes average load

PS. Linux system is 5 seconds to load sample

Second, load average meaning 2.1 single-core processor

Suppose our system is a single CPU single core, it is likened to a one-way road, the CPU task compared to a car. When the car was not much, load <1; load=1 when the car occupied the whole road, when the road was full, and the road was full of cars, load>1

Load < 1

Load = 1
Load >1

2.2 Multi-core processors

We often find that server load > 1 is still good, because the server is a multi-core processor (multi-core).

Assuming that our server CPU is 2 cores, then it will mean we have 2 roads, our load = 2 o'clock, all roads are full of vehicles.

Load = 2 o'clock the road is full.

#查看CPU Core
grep ' model name '/proc/cpuinfo | Wc-l 3. What kind of load average value to be vigilant
    • 0.7 < Load < 1: At this time it is a good state, if you come in more cars, your road can still cope.
    • Load = 1: Your road is about to jam, and there's no more resources for extra tasks, just look at what's going on.
    • Load > 5: Very serious congestion, our road is very busy, each car can not run quickly
4. Three kinds of load values, which should I see?

Usually we look at load for 15 minutes, if load is high, then look at 1 minutes and 5 minute load to see if there is a downtrend.

1 minutes Load value > 1, then we don't have to worry, but if the 15-minute load is more than 1, we have to hurry and see what's going on. So we have to look at these three values according to the actual situation.

5. Configure load monitoring alarms with Nagios

See article: http://heipark.iteye.com/blog/1340190

Reference:

Understanding Linux CPU Load-when should are you worried?

Http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages

Unix/linux's Load primary explanation

Http://www.dbanotes.net/arch/unix_linux_load.html

The load average in the top command shows the average system load for the last 1 minutes, 5 minutes, and 15 minutes. System average load representation

The average system load is defined as the average process tree in the queue (running on the CPU or waiting for how many processes to run) within a specific time interval. If a process meets the following criteria, it will be in the run queue:
-It is not in the result of waiting for I/O operation
-It does not actively enter the waiting state (that is, "Wait" is not called)
-Not stopped (for example: waiting to be terminated)

In Linux, the process is divided into three states

, one is the blocking process blocked processes,

One is the runnable process that can be run,

Another is the running process running.

When a process is blocked, the process waits for data or system calls from the I/O device.


When a process is operational, it is in a run queue running the queues, competing for CPU time with other running processes. The system's load is the total number of processes that are running running one and are ready to run runnable one.

For example, now that the system has 2 running processes and 3 running processes, the system's load is 5

。 Load average is the number of load in a given amount of time

Understand the load average (graphics) in the Linux system

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.