What do the numbers in /proc/loadavg mean on Linux?

Linux

Linux Problem Overview


When issuing this command on Linux:

# cat /proc/loadavg
0.75 0.35 0.25 1/25 1747

The first three numbers are load averages. What are the last 2 numbers?

The last one keeps increasing by 2 every second, should I be worried?

Linux Solutions


Solution 1 - Linux

/proc/loadavg

> The first three fields in this file are load average figures giving > the number of jobs in the run queue (state R) or waiting for disk > I/O (state D) averaged over 1, 5, and 15 minutes. They are the > same as the load average numbers given by uptime(1) and other > programs. > > The fourth field consists of two numbers separated by a > slash (/). The first of these is the number of currently executing > kernel scheduling entities (processes, threads); this will be less > than or equal to the number of CPUs. The value after the slash is the > number of kernel scheduling entities that currently exist on the > system. > > The fifth field is the PID of the process that was most > recently created on the system.

Solution 2 - Linux

I would like to comment the accepted answer.

> The fourth field consists of two numbers separated by a slash (/). The > first of these is the number of currently executing kernel scheduling > entities (processes, threads); this will be less than or equal to the > number of CPUs.

I did a test program that reads integer N from input and then creates N threads and their run them forever. On RHEL 6.5 computer I have 8 processor and each processor has hyper threading. Anyway if I run my test and it creates 128 threads I see in the fourth field values that are greater than 128, for example 135. It is clearly greater than the number of CPU. This post supports my observation: http://juliano.info/en/Blog:Memory_Leak/Understanding_the_Linux_load_average

> It is worth noting that the current explanation in proc(5) manual page > (as of man-pages version 3.21, March 2009) is wrong. It reports the > first number of the forth field as the number of currently executing > scheduling entities, and so predicts it can't be greater than the > number of CPUs. That doesn't match the real implementation, where this > value reports the current number of runnable threads.

Solution 3 - Linux

> The first three columns measure CPU and I/O utilization of the last one, five, and 15 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used.

https://docs.fedoraproject.org/en-US/Fedora/17/html/System_Administrators_Guide/s2-proc-loadavg.html

Solution 4 - Linux

The following page explains these in detail:

http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

> Some interpretations: > > - If the averages are 0.0, then your system is idle. > - If the 1 minute average is higher than the 5 or 15 minute averages, then load is increasing. > - If the 1 minute average is lower than the 5 or 15 minute averages, then load is decreasing. > - If they are higher than your CPU count, then you might have a performance problem (it depends).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionUlteriorView Question on Stackoverflow
Solution 1 - LinuxauselenView Answer on Stackoverflow
Solution 2 - Linuxuser184968View Answer on Stackoverflow
Solution 3 - Linuxuser647772View Answer on Stackoverflow
Solution 4 - LinuxValidus OculusView Answer on Stackoverflow