Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2023 17:08:50 -0800
From:      Stavros Filargyropoulos <stav@stav.cc>
To:        Paul Procacci <pprocacci@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Load 0.20 on a freshly installed idle system
Message-ID:  <CAGAKwcid8j3C28wiypO87X9HT9Wq8cfTNHWnOQvcQgAcWrFuLw@mail.gmail.com>
In-Reply-To: <CAFbbPujMDQgo=zvSc5orcT=v3ftrVPXDjZE-D%2BUxt3%2BdOjFmUA@mail.gmail.com>
References:  <CAGAKwcjmzz%2B6NMaK2YpjWZPB282RvrKV6zQ%2BSLHsDj3zqXwvGw@mail.gmail.com> <CAFbbPuhX%2BrJFLn8ALVNbCujf1tG3DufVWGSknPkJ%2BKdovFq1xQ@mail.gmail.com> <CAGAKwcgFWukBrB_6SZVAoC4YKyPVhVMGED4aB6Z4E1fwZAO6mg@mail.gmail.com> <CAFbbPuhyJDewvE_a6MQpiGrpUew7EtxZKwt_=RHODNUyCYNduw@mail.gmail.com> <CAGAKwcghHH5t1_dtWPkOCwxPvDra%2BmgNFTQsG65i1_7pzTDkug@mail.gmail.com> <CAFbbPujMDQgo=zvSc5orcT=v3ftrVPXDjZE-D%2BUxt3%2BdOjFmUA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Well, actually you were not far off.

The 5 seconds is the interval we look into the run queue:

https://svnweb.freebsd.org/base/head/sys/kern/kern_synch.c?view=markup#l87.

The average is still for 1, 5, 15 min. So a load 0.20 means that out of the
12 times we looked in the run queue the past minute, at least 2.5 there was
a job. Which I think is consistent with what everyone understands `load`
is. And again is not what I see in `top`.

Unless we count the  `idle` process? Which we shouldn't...



On Fri, Jan 20, 2023 at 4:56 PM Paul Procacci <pprocacci@gmail.com> wrote:

> I'll concede it probably isn't a 5 second window as what I've provided is
> for OpenBSD, but it's still a measurement of processes in the run queue -
> that's for sure.
> I'm being lazy and don't want to look at the source code.  That's
> something you could do.
>
> Thanks,
> Paul Procacci
>
> On Fri, Jan 20, 2023 at 7:28 PM Stavros Filargyropoulos <stav@stav.cc>
> wrote:
>
>> Thanks Paul, but If that was the case, then running 5 `top -SH` with a
>> refresh of 1 second, should increase the load to x4. Which is not what I
>> see.
>>
>> This answer seems a bit vague. Is that the best explanation we have? Do
>> you mean to say that there is not a single freebsd box out there that has a
>> load of less than 0.20?
>>
>> I'm pretty sure that last time I run FreeBSD that wasn't the case. Also
>> haven't seen this load in idle system in any other *BSDs.
>>
>> Thanks for taking a look anyway.
>>
>> On Fri, Jan 20, 2023 at 4:19 PM Paul Procacci <pprocacci@gmail.com>
>> wrote:
>>
>>> Stavros,
>>>
>>> Load averages by themselves mean very little.
>>> It's not a figure of cpu usage if that's what you're worried about.
>>>
>>> Load averages on BSD are simply processes which have wanted to run at
>>> least once in the most recent 5-second window, with a degradation over
>>> time.[1]
>>>
>>> Unless you're having a specific problem, I'd guess to say there is no
>>> problem here at all.
>>>
>>> Thanks,
>>> Paul Procacci
>>>
>>> [1] - http://www.undeadly.org/cgi?action=article&sid=20090715034920
>>>
>>>
>>> On Fri, Jan 20, 2023 at 6:59 PM Stavros Filargyropoulos <stav@stav.cc>
>>> wrote:
>>>
>>>> Thanks Paul.
>>>>
>>>> Yeah, I used the `-SH` flags. Don't see anything suspicious.
>>>>
>>>> This is is the output of the `systat`: Not sure I understand much from
>>>> it
>>>>
>>>>     2 users    Load  0.20  0.15  0.06                  Jan 20 15:54:53
>>>>    Mem usage:   1%Phy  0%Kmem                           VN PAGER   SWAP
>>>> PAGER
>>>> Mem:      REAL           VIRTUAL                        in   out     in
>>>>   out
>>>>        Tot   Share     Tot    Share     Free   count
>>>> Act 33476K  10672K    513G   12612K   31367M   pages
>>>> All 35920K  12928K    513G   47112K                       ioflt
>>>>  Interrupts
>>>> Proc:                                                     cow      34
>>>> total
>>>>   r   p   d    s   w   Csw  Trp  Sys  Int  Sof  Flt       zfod
>>>>  uart0 4
>>>>               25       118    1   21    5   13    1       ozfod    10
>>>> cpu0:timer
>>>>                                                          %ozfod     9
>>>> cpu1:timer
>>>>  0.0%Sys   0.0%Intr  0.0%User  0.0%Nice  100%Idle         daefr     6
>>>> cpu2:timer
>>>> |    |    |    |    |    |    |    |    |    |    |       prcfr     4
>>>> cpu3:timer
>>>>                                                           totfr     4
>>>> xhci0 128
>>>>                                        229 dtbuf          react
>>>> ahci0 129
>>>> Namei     Name-cache   Dir-cache    619780 maxvn          pdwak
>>>> nvme0:admi
>>>>    Calls    hits   %    hits   %       805 numvn        5 pdpgs
>>>> nvme0:io0
>>>>        7       7 100                    52 frevn          intrn
>>>> nvme0:io1
>>>>                                                      355M wire
>>>>  nvme0:io2
>>>> Disks  nvd0  ada0  ada1  ada2  ada3  ada4   da0       17M act
>>>> nvme0:io3
>>>> KB/t  16.00  0.00  0.00  0.00  0.00  0.00  0.00     2880K inact
>>>> igb0:rxq0
>>>> tps       0     0     0     0     0     0     0         0 laund
>>>> igb0:rxq1
>>>> MB/s   0.01  0.00  0.00  0.00  0.00  0.00  0.00       31G free      1
>>>> igb0:rxq2
>>>> %busy     0     0     0     0     0     0     0      142M buf
>>>> igb0:rxq3
>>>>
>>>> igb0:aq
>>>>
>>>> And the output of `top -SH` for reference:
>>>>
>>>> last pid:  1508;  load averages:  0.25,  0.22,  0.10
>>>>
>>>>                                                                   up
>>>> 0+00:08:13  15:57:54
>>>> 131 threads:   5 running, 106 sleeping, 20 waiting
>>>> CPU:  0.1% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.9% idle
>>>> Mem: 16M Active, 3032K Inact, 355M Wired, 142M Buf, 31G Free
>>>> Swap: 3962M Total, 3962M Free
>>>>
>>>>   PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU
>>>> COMMAND
>>>>    11 root        155 ki31     0B    64K RUN      2   8:12  99.99%
>>>> idle{idle: cpu2}
>>>>    11 root        155 ki31     0B    64K CPU3     3   8:11  99.98%
>>>> idle{idle: cpu3}
>>>>    11 root        155 ki31     0B    64K CPU0     0   8:12  99.97%
>>>> idle{idle: cpu0}
>>>>    11 root        155 ki31     0B    64K CPU1     1   8:11  99.96%
>>>> idle{idle: cpu1}
>>>>     0 root        -76    -     0B   640K -        0   0:00   0.04%
>>>> kernel{if_config_tqg_0}
>>>>  1508 stavros      20    0    14M  3812K CPU2     2   0:00   0.02% top
>>>>  1493 stavros      20    0    15M  5080K select   1   0:00   0.02% tmux
>>>>    12 root        -60    -     0B   320K WAIT     3   0:01   0.01%
>>>> intr{swi4: clock (0)}
>>>>     5 root        -16    -     0B    16K -        0   0:00   0.01%
>>>> rand_harvestq
>>>>     6 root        -16    -     0B    48K psleep   0   0:00   0.00%
>>>> pagedaemon{dom0}
>>>>  1440 stavros      20    0    21M  9440K select   3   0:00   0.00% sshd
>>>>  1404 root         20    0    18M  6988K select   2   0:00   0.00%
>>>> sendmail
>>>>    15 root        -72    -     0B    96K -        3   0:00   0.00%
>>>> usb{usbus0}
>>>>    12 root        -60    -     0B   320K WAIT     2   0:00   0.00%
>>>> intr{swi4: clock (2)}
>>>>    12 root        -88    -     0B   320K WAIT     2   0:00   0.00%
>>>> intr{irq128: xhci0}
>>>>     8 root         20    -     0B   144K sdflus   3   0:00   0.00%
>>>> bufdaemon{/ worker}
>>>>    12 root        -60    -     0B   320K WAIT     1   0:00   0.00%
>>>> intr{swi4: clock (1)}
>>>>     0 root        -76    -     0B   640K -        2   0:00   0.00%
>>>> kernel{if_io_tqg_2}
>>>>     8 root        -16    -     0B   144K -        1   0:00   0.00%
>>>> bufdaemon{bufspacedaemon-0}
>>>>     9 root         16    -     0B    16K syncer   3   0:00   0.00%
>>>> syncer
>>>>    12 root        -60    -     0B   320K WAIT     3   0:00   0.00%
>>>> intr{swi4: clock (3)}
>>>>     8 root        -16    -     0B   144K psleep   2   0:00   0.00%
>>>> bufdaemon{bufdaemon}
>>>>     8 root        -16    -     0B   144K -        0   0:00   0.00%
>>>> bufdaemon{bufspacedaemon-1}
>>>>
>>>> Thanks,
>>>> Stavros
>>>>
>>>>
>>>> On Fri, Jan 20, 2023 at 2:03 PM Paul Procacci <pprocacci@gmail.com>
>>>> wrote:
>>>>
>>>>> What flags have you included with top?
>>>>>
>>>>> By default `top` doesn't show any kernel related processes.  `top
>>>>> -SH`  is useful in this respect and others flags may be useful as well.
>>>>>
>>>>> systat -vmstat
>>>>>
>>>>> ^^  Another command that I like.  Also may give you insight.
>>>>>
>>>>> Thanks,
>>>>> Paul Procacci
>>>>>
>>>>> On Fri, Jan 20, 2023 at 4:33 PM Stavros Filargyropoulos <stav@stav.cc>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I just installed 13.1 on a system, and the load is at 0.20 at all
>>>>>> times, although nothing is running and the CPU is 100% free.
>>>>>>
>>>>>> `ps aux` and `top` don't show anything of interest either.
>>>>>>
>>>>>> For what's worth it, the motherboard is a Supermicro X12STL-IF and
>>>>>> the CPU a Xeon 2314.
>>>>>>
>>>>>> Any ideas/commands that will help me troubleshoot this further?
>>>>>>
>>>>>> Thanks,
>>>>>> Stavros
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> __________________
>>>>>
>>>>> :(){ :|:& };:
>>>>>
>>>>
>>>
>>> --
>>> __________________
>>>
>>> :(){ :|:& };:
>>>
>>
>
> --
> __________________
>
> :(){ :|:& };:
>

[-- Attachment #2 --]
<div dir="ltr"><div>Well, actually you were not far off.</div><div><br></div><div>The 5 seconds is the interval we look into the run queue:</div><div><br></div><div><a href="https://svnweb.freebsd.org/base/head/sys/kern/kern_synch.c?view=markup#l87">https://svnweb.freebsd.org/base/head/sys/kern/kern_synch.c?view=markup#l87</a>.</div><div><br></div><div>The average is still for 1, 5, 15 min. So a load 0.20 means that out of the 12 times we looked in the run queue the past minute, at least 2.5 there was a job. Which I think is consistent with what everyone understands `load` is. And again is not what I see in `top`.</div><div><br></div><div>Unless we count the  `idle` process? Which we shouldn&#39;t...<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 4:56 PM Paul Procacci &lt;<a href="mailto:pprocacci@gmail.com">pprocacci@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I&#39;ll concede it probably isn&#39;t a 5 second window as what I&#39;ve provided is for OpenBSD, but it&#39;s still a measurement of processes in the run queue - that&#39;s for sure.<br></div><div>I&#39;m being lazy and don&#39;t want to look at the source code.  That&#39;s something you could do.</div><div><br></div><div>Thanks,</div><div>Paul Procacci<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 7:28 PM Stavros Filargyropoulos &lt;<a href="mailto:stav@stav.cc" target="_blank">stav@stav.cc</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Thanks Paul, but If that was the case, then running 5 `top -SH` with a refresh of 1 second, should increase the load to x4. Which is not what I see.</div><div><br></div><div>This answer seems a bit vague. Is that the best explanation we have? Do you mean to say that there is not a single freebsd box out there that has a load of less than 0.20?<br></div><div><br></div><div>I&#39;m pretty sure that last time I run FreeBSD that wasn&#39;t the case. Also haven&#39;t seen this load in idle system in any other *BSDs.<br></div><div><br></div><div>Thanks for taking a look anyway.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 4:19 PM Paul Procacci &lt;<a href="mailto:pprocacci@gmail.com" target="_blank">pprocacci@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Stavros,</div><div><br></div>Load averages by themselves mean very little.<br></div><div>It&#39;s not a figure of cpu usage if that&#39;s what you&#39;re worried about.</div><div><br></div><div>Load averages on BSD are simply processes which have wanted to run at 
least once in the most recent 5-second window, with a degradation over 
time.[1]<br><br></div><div>Unless you&#39;re having a specific problem, I&#39;d guess to say there is no problem here at all.</div><div><br></div><div>Thanks,</div><div>Paul Procacci</div><div><br></div><div>[1] - <a href="http://www.undeadly.org/cgi?action=article&amp;sid=20090715034920" target="_blank">http://www.undeadly.org/cgi?action=article&amp;sid=20090715034920</a></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 6:59 PM Stavros Filargyropoulos &lt;<a href="mailto:stav@stav.cc" target="_blank">stav@stav.cc</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks Paul.<br><br>Yeah, I used the `-SH` flags. Don&#39;t see anything suspicious.<br><br>This is is the output of the `systat`: Not sure I understand much from it<br><br>    2 users    Load  0.20  0.15  0.06                  Jan 20 15:54:53<br>   Mem usage:   1%Phy  0%Kmem                           VN PAGER   SWAP PAGER<br>Mem:      REAL           VIRTUAL                        in   out     in   out<br>       Tot   Share     Tot    Share     Free   count<br>Act 33476K  10672K    513G   12612K   31367M   pages<br>All 35920K  12928K    513G   47112K                       ioflt  Interrupts<br>Proc:                                                     cow      34 total<br>  r   p   d    s   w   Csw  Trp  Sys  Int  Sof  Flt       zfod        uart0 4<br>              25       118    1   21    5   13    1       ozfod    10 cpu0:timer<br>                                                         %ozfod     9 cpu1:timer<br> 0.0%Sys   0.0%Intr  0.0%User  0.0%Nice  100%Idle         daefr     6 cpu2:timer<br>|    |    |    |    |    |    |    |    |    |    |       prcfr     4 cpu3:timer<br>                                                          totfr     4 xhci0 128<br>                                       229 dtbuf          react       ahci0 129<br>Namei     Name-cache   Dir-cache    619780 maxvn          pdwak       nvme0:admi<br>   Calls    hits   %    hits   %       805 numvn        5 pdpgs       nvme0:io0<br>       7       7 100                    52 frevn          intrn       nvme0:io1<br>                                                     355M wire        nvme0:io2<br>Disks  nvd0  ada0  ada1  ada2  ada3  ada4   da0       17M act         nvme0:io3<br>KB/t  16.00  0.00  0.00  0.00  0.00  0.00  0.00     2880K inact       igb0:rxq0<br>tps       0     0     0     0     0     0     0         0 laund       igb0:rxq1<br>MB/s   0.01  0.00  0.00  0.00  0.00  0.00  0.00       31G free      1 igb0:rxq2<br>%busy     0     0     0     0     0     0     0      142M buf         igb0:rxq3<br><div>                                                                      igb0:aq</div><div><br></div><div>And the output of `top -SH` for reference:<br></div><div><br></div><div>last pid:  1508;  load averages:  0.25,  0.22,  0.10                                                                                                                                                                 up 0+00:08:13  15:57:54<br>131 threads:   5 running, 106 sleeping, 20 waiting<br>CPU:  0.1% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.9% idle<br>Mem: 16M Active, 3032K Inact, 355M Wired, 142M Buf, 31G Free<br>Swap: 3962M Total, 3962M Free<br><br>  PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND<br>   11 root        155 ki31     0B    64K RUN      2   8:12  99.99% idle{idle: cpu2}<br>   11 root        155 ki31     0B    64K CPU3     3   8:11  99.98% idle{idle: cpu3}<br>   11 root        155 ki31     0B    64K CPU0     0   8:12  99.97% idle{idle: cpu0}<br>   11 root        155 ki31     0B    64K CPU1     1   8:11  99.96% idle{idle: cpu1}<br>    0 root        -76    -     0B   640K -        0   0:00   0.04% kernel{if_config_tqg_0}<br> 1508 stavros      20    0    14M  3812K CPU2     2   0:00   0.02% top<br> 1493 stavros      20    0    15M  5080K select   1   0:00   0.02% tmux<br>   12 root        -60    -     0B   320K WAIT     3   0:01   0.01% intr{swi4: clock (0)}<br>    5 root        -16    -     0B    16K -        0   0:00   0.01% rand_harvestq<br>    6 root        -16    -     0B    48K psleep   0   0:00   0.00% pagedaemon{dom0}<br> 1440 stavros      20    0    21M  9440K select   3   0:00   0.00% sshd<br> 1404 root         20    0    18M  6988K select   2   0:00   0.00% sendmail<br>   15 root        -72    -     0B    96K -        3   0:00   0.00% usb{usbus0}<br>   12 root        -60    -     0B   320K WAIT     2   0:00   0.00% intr{swi4: clock (2)}<br>   12 root        -88    -     0B   320K WAIT     2   0:00   0.00% intr{irq128: xhci0}<br>    8 root         20    -     0B   144K sdflus   3   0:00   0.00% bufdaemon{/ worker}<br>   12 root        -60    -     0B   320K WAIT     1   0:00   0.00% intr{swi4: clock (1)}<br>    0 root        -76    -     0B   640K -        2   0:00   0.00% kernel{if_io_tqg_2}<br>    8 root        -16    -     0B   144K -        1   0:00   0.00% bufdaemon{bufspacedaemon-0}<br>    9 root         16    -     0B    16K syncer   3   0:00   0.00% syncer<br>   12 root        -60    -     0B   320K WAIT     3   0:00   0.00% intr{swi4: clock (3)}<br>    8 root        -16    -     0B   144K psleep   2   0:00   0.00% bufdaemon{bufdaemon}<br>    8 root        -16    -     0B   144K -        0   0:00   0.00% bufdaemon{bufspacedaemon-1}</div><div><br></div><div>Thanks,</div><div>Stavros<br></div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 2:03 PM Paul Procacci &lt;<a href="mailto:pprocacci@gmail.com" target="_blank">pprocacci@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>What flags have you included with top?</div><div><br></div><div>By default `top` doesn&#39;t show any kernel related processes.  `top -SH`  is useful in this respect and others flags may be useful as well.</div><div><br></div><div>systat -vmstat <br><br></div><div>^^  Another command that I like.  Also may give you insight.</div><div><br></div><div>Thanks,</div><div>Paul Procacci<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 20, 2023 at 4:33 PM Stavros Filargyropoulos &lt;<a href="mailto:stav@stav.cc" target="_blank">stav@stav.cc</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I just installed 13.1 on a system, and the load is at 0.20 at all times, although nothing is running and the CPU is 100% free.</div><div><br></div><div>`ps aux` and `top` don&#39;t show anything of interest either.</div><div><br></div><div>For what&#39;s worth it, the motherboard is a Supermicro
X12STL-IF and the CPU a Xeon 2314.</div><div><br></div><div>Any ideas/commands that will help me troubleshoot this further?</div><div><br></div><div>Thanks,</div><div>Stavros<br></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">__________________<br><br>:(){ :|:&amp; };:</div>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">__________________<br><br>:(){ :|:&amp; };:</div>
</blockquote></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">__________________<br><br>:(){ :|:&amp; };:</div>
</blockquote></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGAKwcid8j3C28wiypO87X9HT9Wq8cfTNHWnOQvcQgAcWrFuLw>