Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Процитирую свой же комментарий в статье "CPU Load: когда начинать волноваться?"
В старом посте про load average давали ссылку на замечательную статью, где я и прочитал про это самое «экспоненциально взвешенное скользящее среднее»,
Очень рекомендую к прочтению, можно даже добавить в пост.
Часть 1 www.teamquest.com/pdfs/whitepaper/ldavg1.pdf
Часть 2 www.teamquest.com/pdfs/whitepaper/ldavg2.pdf
в стандартной архитектуре intel этот промежуток равен 10мс
If the process uses its fully allotted CPU time of 10ms, an interrupt is raised by the hardware, and the kernel regains control from the process.
It is the name of a number. The actual value of that number is machine-
dependent. The following platforms use HZ == 100:
•Intel Pentium
•Power PC
•Ultra-SPARC
whereas the HP Alpha uses HZ == 1024 or HZ == 1200, depending on the CPU model. We’ll
assume HZ represents 100 in the subsequent explanation.
Every computer platform has a clock implemented in hardware that has a constant ticking
rate by which everything else in the system is synchronized. To make this ticking rate known
to the system, the hardware sends an interrupt to the Linux kernel on every clock tick. A HZ
value of 100 means that one second of wall-clock time corresponds to 100 CPU ticks.
Что больше всего похоже на описание хардварного watchdog timer, вставленного на 10мс.
Пока что мне кажется странным прерывание каждые 10мс, независимо от состояния системы, поскольку они с большой вероятностью попадут на нормально работающий процесс.
1,5 или 15 минут
Thus the 3 factors that drive the Load Average on a Linux system are processes that are on the run-queue because they:Таким образом, при хорошей нагрузке легко получить высокий LA при затупах дисковой или сетевой подсистемы (как из за аппаратных проблем, так и из за программных).
* Run on, or are waiting for, the CPU
* Perform disk I/O
* Perform network I/O
сколько всего процессов находится в состоянии RUNNING и UNINTERRUPTIBLE
632 if ((p->state == TASK_RUNNING ||
633 (p->state & TASK_UNINTERRUPTIBLE)))
634 nr += FIXED_1;


Как считается Load Average