Ow can/proc/loadavg be used?

Source: Internet
Author: User

See http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2006-11/msg00577.html

Re: How can/proc/loadavg be used?
  • From
    : Bruce Barnett <spamhater113 + u061115075347 @ xxxxxxxxxxxx
    >
  • Date
    : Wed, 15 Nov 2006 13:00:11 + 0000 (UTC)

Bo Yang <struggle @ xxxxxxxxxxxxxxxxxx> writes:

In Linux proc filesystem, there is a file
Loadavg, it contain three fields seperately
Describe the last 1, 5, 15 minutes load average.

Also avalable In the uptime (1) command for older systems.
The top (1) program shows this as well.

And my question is, how the kernel calculate
These three number,

The load average is the number of jobs that are ready to run at that time.
Let me give some more detail.

If a process is sleeping because it's waiting for input, it's not
Ready to run. So a process waiting for a disk or network input is not
Ready to run. A process that was using 100% CPU and 0% disk is always
Ready to run.

Rarely are jobs 100% CPU or 100% I/O. It's always a mixture.

Three important points

The load average is the number of processes that cocould run if
Scheduler let them run. A dual core CPU cocould handle 2 processes using
100% CPU. If that is all that is running, it's fine.

The second is-How quickly do these jobs complete?
If another process starts, and completes quickly-fine.

The third is-how do these numbers look at 1 minute, 5 minutes and 15
Minutes, and how do they change.

Load average: 10.00, 5.03, 1.00

-This is trouble. The load average is increasing.

Load average: 1.00, 5.03, 10.00

-The opposite. The load average was 10.0 paiteen minutes ago,
And the CPU is recovering.

Load average: 4.00, 4.03, 4.00

-A steady load

And how big the number is
For a normal running server?

There is no simple answer. If the computer is able to complete
Jobs in sufficient time, then it is fine. Sufficient is something you
Have to define. We can't do that.
Examples:

Web Server
Mail Server
Financial database
Simulation Server

All of these systems have different requirements for completion of
Job. A load average of 10 may be fine for one, and a disaster
Another.

You can look at other tools as well.
I like top (1) as it shows a lot of information, including percent idle.

P.s. Your English is better than my Chinese.

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.