R
R
ReD2015-02-03 11:57:33
linux
ReD, 2015-02-03 11:57:33

How exactly is Load average calculated?

I wanted a clear presentation of the question about LA (Load average). It is known that this is the number of blocking processes in the queue for execution in a certain time interval. Where "blocking process" is a process that is waiting for resources (CPU, disk I/O, or network I/O) to continue running. It is also known that these numbers are considered as exponentially weighted averages. However, there is no clear and precise understanding of which resources and how they influence. Ideally, I would like to look at the part of the code where these average values ​​​​are calculated. But I don't know very well where to look for them. In top/htop sources?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Archie Kuznetsov, 2015-02-04
@trinitr0

www.linuxjournal.com/article/9001

D
dilez, 2015-02-05
@dilez

#define CALC_LOAD in sched.h You can try to build on this if it helps in your case.
In my opinion, if you are not a developer of systems and utilities for it, then it is much more important to understand the thresholds of these abstract values, and they are abstract in nature, as they are collected and averaged, and then parsed with more specific tools.

P
Puma Thailand, 2015-02-03
@opium

well, the open source code for everything is open right up to the kernel, what's stopping you from watching it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question