Vmstat And Loadavg Disagree About System Load

Home » CentOS » Vmstat And Loadavg Disagree About System Load
CentOS 9 Comments

1 4 499492 150392 4496 4763380 0 0 192 552 1227 1094 2 0 75 24 0
0 5 499492 150656 4500 4763528 0 0 0 160 465 263 1 0 68 30 0
0 5 499492 150468 4500 4763532 0 0 0 0 177 93 1 0 69 31 0
1 5 499492 151020 4500 4763540 0 0 0 0 160 132 0 0 69 31 0
1 5 499492 151268 4500 4763540 0 0 0 0 304 143 1 0 69 30 0
0 5 499492 151368 4500 4763540 0 0 0 344 369 192 0 0 69 31 0
0 1 499492 145020 4512 4771032 0 0 6260 1428 2013 2613 4 1 79 17 0
2 0 499492 140432 4512 4769396 0 0 31872 72 2393 2796 8 1 87 3 0
1 0 499500 137332 4512 4769432 0 8 25984 80 2052 2012 8 1 90 1 0
1 0 499508 132992 4512 4772592 0 8 24960 384 2325 2344 8 1 90 1 0
3 0 499520 135720 4400 4768792 0 12 24840 252 2491 2345 9 1 89 1 0
0 2 499520 210740 4404 4693096 0 0 15904 384 1798 1513 6 1 90 4 0
1 2 499520 210856 4404 4693636 0 0 0 0 154 119 0 0 87 12 0
0 2 499520 211328 4404 4693832 0 0 0 0 128 119 0 0 87 13 0
0 2 499520 212080 4404 4693832 0 0 0 0 128 144 0 0 87 12 0
0 2 499520 212700 4404 4693836 0 0 0 0 115 135 0 0 87 13 0
0 2 499520 213196 4404 4693836 0 0 0 336 88 102 0 0 87 12 0
2 0 499520 202552 4416 4704504 0 0 7984 17852 2036 1828 6 1 87 7 0
2 0 499520 172800 4416 4733208 0 0 25744 128 2165 2094 9 1 89 2 0
2 0 499520 153872 4416 4754468 0 0 18816 392 2000 1996 7 0 88 4 0
3 0 499520 169620 4416 4738300 0 0 27520 480 2346 2248 9 1 90 1 0
2 0 499520 140260 4416 4765328 0 0 24584 224 2247 2231 9 1 90 1 0
0 2 499520 179204 4416 4725748 0 0 17164 3564 1701 1619 5 1 87 8 0
0 2 499520 179948 4416 4725488 0 0 0 0 209 131 1 0 87 13 0
0 2 499520 180072 4416 4725492 0 0 0 0 111 117 0 0 87 12 0
0 2 499520 180436 4416 4725492 0 0 0 0 71 81 0 0 87 13 0
0 2 499520 180560 4416 4725492 0 0 0 0 182 110 0 0 87 13 0
0 1 499520 180180 4416 4725492 0 0 0 344 315 179 0 0 87 12 0
2 0 499520 182196 4428 4731300 0 0 2944 1108 1828 1935 6 0 86 8 0
1 0 499520 150180 4428 4757292 0 0 23936 88 2038 1905 7 1 88 4 0
2 0 499520 157264 4428 4751916 0 0 23568 176 2324 2139 8 1 87 5 0
1 2 499520 135936 4428 4770852 0 0 27144 120 2428 2449 9 1 85 6 0
2 1 499520 148336 4428 4761668 0 0 19072 192 2281 2420 8 1 83 8 0
0 2 499520 156408 4432 4749652 0 0 12416 436 1303 1235 3 0 86 11 0
^C
[root@idm-amst-db-12 ~]# ^C
[root@idm-amst-db-12 ~]# ^C
[root@idm-amst-db-12 ~]# uptime
01:47:47 up 26 days, 4:21, 1 user, load average: 26.85, 22.12, 19.38
[root@idm-amst-db-12 ~]# uptime
01:47:58 up 26 days, 4:21, 1 user, load average: 24.38, 21.74, 19.29
[root@idm-amst-db-12 ~]# cat /proc/loadavg
25.40 22.05 19.45 1/555 13911

Sincerely, Mingfei Hua

9 thoughts on - Vmstat And Loadavg Disagree About System Load

  • two completely different sorts of numbers. vmstat is printing the %
    of CPU usage by user, sys, and idle. load average is the average number of ‘ready to run’ processes in the last 1, 5, and 15 minutes.

  • Hi John, The first two number of vmstat is running process and blocked process, the sum of the two number should equal to system load. But it’s inconsistent in this case.

    Regards, Mingfei

    —–Original Message—

  • linux load average counts processes that are doing disk IO or network IO
    as being ‘ready’. they aren’t actually running, but neither are they waiting on user input (‘blocked’ per vmstat’s version of reality).

  • The man interpretation of vmstat running and blocked process:
    Procs
    r: The number of processes waiting for run time.
    b: The number of processes in uninterruptible sleep. The blocked here is not process waiting user input, it should include process waiting IO and network. It should has same meaning with system load in loadavg which include running(runnable) process and process in status of uninterruptible sleep.

    Regards, Mingfei
    —–Original Message—

  • I could care less what man pages say, I’m saying THATS NOT HOW IT WORKS. Linux has *ALWAYS* worked this way. Load Average is measuring something completely different than your ‘r’ and ‘b’ in vmstat. Presumably, there are far more processes in ‘interruptable sleep’ than ‘uninterruptable sleep’, and vmstat doesn’t seem to count these.

  • If I’m not mistaken the “cost” of switching between processes also adds to system load…

    ++++++++++++++++++++++++++++++++++++++++
    Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247
    ++++++++++++++++++++++++++++++++++++++++