Linux load average

Source: Internet
Author: User
Http://inthirties.com: 90/thread-1262-1-1.html
You can view the load average information when running top and some commands in Linux.

We know that this is information about the system load, and the smaller the better.

I found some information today. Learn more

The average system load is defined as the average process tree in the running queue within a specific time interval. If a process meets the following conditions, it will be in the running queue:

-It has no results waiting for I/O operations.

-It does not take the initiative to enter the waiting state (that is, it does not call 'wait ')

-Not stopped (for example, waiting for termination)

====== It is critical that not every process is included.

How to calculate load average

To enable the kernel to efficiently calculate the load average, fixed-point arithmetic is used. Fixed-Point
Arithmetic is a very fast method for simulating floating-point operations, especially on processors without FPU (float point unit) components.

Formula: load (t) = load (t-1) e ^ (-5/60) + N (1-
E ^ (-5/60), iterative calculation, where n is run-queue length.

By the exponential smoothing equation, y (t) = y (t-1) + A * [x (t)-y (t-1)], wherex (t)
Is the input raw data, y (t-1) is the value due to
Previussmoothing iteration and Y (t) is the new smoothed
Value. If a = 1-B and B is e ^ (-5/60), the calculation formula of load average is obtained.

The benefit of using this formula: local load jitter does not significantly affect load average and smooth it.

Load average

Generally, as long as the number of active processes of each CPU is not greater than 2, the system performance is good. If the number of tasks of each CPU is greater than 5, it indicates that the performance of this machine has a serious problem.
Question.

Assuming that the system has two CPUs, the current number of tasks for each CPU is: Load
Average/2. The value obtained at this time can be determined by referring to the above 2-5 standards.

=== Here is the calculation formula. I have stayed in a stock company. I have learned how to calculate indicators and evaluation parameters before. It is very helpful to understand this formula.

  • Provides Oracle management/troubleshooting/optimization/installation/RAC/Backup Recovery technical services, and professional Oracle training and consulting services.
  • Mail: inthirties@gmail.com
  • MSN: inthirties@hotmail.com
  • QQ: inthirties@qq.com
  • Tel: 13828706466
  • Technical blog http://blog.csdn.net/inthirties
  • Personal site http://blog.inthirties.com

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.