Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Nov 2022 23:21:31 +0000
From:      0x1eef <0x1eef@protonmail.com>
To:        Paul Procacci <pprocacci@gmail.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: High CPU usage / high number of interrupts
Message-ID:  <gK0wIYffyGap3mFoEXClIP-k57b-uioxjqsI5T0IaFv6p3SymjqtzfMyjnSY5r1ZNgEbCod8NsqvshcuFYim-v9ELI3p8ZE3U0Nxprxmx9E=@protonmail.com>
In-Reply-To: <CAFbbPuiQtNa0BeZ7X0UhjFyynhFPKFXcF6NE2CZ7ra7hCgYUnw@mail.gmail.com>
References:  <NjJeOo65XxAgvh49UV6bzpgNunj1LH1uXy1xnv5QJgjgZfc0xtbKs7PBJb6Ub9LJaPwBKlf94hcsl_Qqt5Yrh_2-BuX5j4MjAdwSGwWEMs4=@protonmail.com> <CAFbbPuiQtNa0BeZ7X0UhjFyynhFPKFXcF6NE2CZ7ra7hCgYUnw@mail.gmail.com>

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

[-- Attachment #1 --]
Hi !

> Out of curiosity, have you pulled a usb device one by one until the interrupts disappear?

I have three USB devices connected: mouse, keyboard, and an ethernet adapter.
I tried to remove each one by one, and I did not see the interrupt rate change.
I have also tried a cold boot without any USB devices connected, and the interrupt rate was about the same too.

I don't know if it could be related, but there's a trackpad connected to the laptop that does not work. Maybe it has no relation to the issue, but setting "hw.psm.synaptics_support" to "0" also did not help.

When Chromium loses focus, CPU usage usually drops to 0% and does not go above 10% - for as long as I am not using Chromium. I am using the i915 / drm kernel modules.. I saw another report of high CPU usage related to using those two kernel modules, but I wasn't able to identify that as the problem in my case.

Thanks for the help.

Sent with [Proton Mail](https://proton.me/) secure email.

------- Original Message -------
On Saturday, November 26th, 2022 at 8:06 PM, Paul Procacci <pprocacci@gmail.com> wrote:

> Hey,
>
> Not sure of the problem, but I don't see the correlation between Chrome and any usb driver.
> Out of curiosity, have you pulled a usb device one by one until the interrupts disappear?
> I'd be curious to know which device is slamming the system.
>
> Thanks,
> Paul
>
> On Sat, Nov 26, 2022 at 6:02 PM 0x1eef <0x1eef@protonmail.com> wrote:
>
>> Hi, everyone!
>>
>> When I use Chromium, I see a high rate of CPU usage across all four cores. The rate can be anywhere from 20% to 50%, even above that. I am not doing anything intensive, just browsing twitter, reddit, YouTube or GitHub. It has been like this since I installed FreeBSD, but since it's not a blocker I have been lazy about looking into it.
>>
>> I don't know why it happens. I can see that there are a high number of interrupts on 'xhci0', and that seems to carry over to each CPU core as well:
>>
>> # vmstat -i
>> interrupt total rate
>> irq1: atkbd0 50 0
>> irq9: acpi0 403 0
>> cpu0:timer 30716618 98
>> cpu1:timer 25457926 81
>> cpu2:timer 34344531 109
>> cpu3:timer 25542867 81
>> irq128: xhci0 328107434 1044
>> irq130: nvme0:admin 15 0
>> irq131: nvme0:io0 701041 2
>> irq132: nvme0:io1 692045 2
>> irq133: nvme0:io2 792760 3
>> irq134: nvme0:io3 693091 2
>> irq135: hdac0 1718425 5
>> irq136: vgapci0 6273295 20
>> Total 455040501 1448
>>
>> # dmesg | grep xhci0
>> xhci0: <Intel Ice Lake-LP USB 3.1 controller> mem 0x95110000-0x9511ffff at device 20.0 on pci0
>> xhci0: 32 bytes context size, 64-bit DMAusbus0 on xhci0
>>
>> It might also be helpful to know that I tried OpenBSD on the same computer but it was unusable for a similar reason: 95%+ interrupts on CPU. The impact that had made all tasks extremely slow. On FreeBSD it is not as bad, but I still think think it is not normal.
>>
>> Can anyone suggest what might be wrong, tips to debug, etc ? If more information is needed, please let me know. Thanks for your time.
>>
>> Best,0x1eef
>
> --
>
> __________________
>
> :(){ :|:& };:
[-- Attachment #2 --]
<div style="font-family: Arial; font-size: 14px;">Hi !</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;"><span style="font-family:system-ui, sans-serif;display:inline !important">&gt; Out of curiosity, have you pulled a usb device one by one until the interrupts disappear?</span><br></div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">I have three USB devices connected: mouse, keyboard, and an ethernet adapter.&nbsp;</div><div style="font-family: Arial; font-size: 14px;">I tried to remove each one by one, and I did not see the interrupt rate change.</div><div style="font-family: Arial; font-size: 14px;">I have also tried a cold boot without any USB devices connected, and the interrupt rate was about the same too.</div><div style="font-family: Arial; font-size: 14px;"><br></div><div style="font-family: Arial; font-size: 14px;">I don't know if it could be related, but there's a trackpad connected to the laptop that does not work. Maybe it has no relation to the issue, but setting "<span>hw.psm.synaptics_support" to "0" also did not help.</span></div><div style="font-family: Arial; font-size: 14px;"><span><br></span></div><div style="font-family: Arial; font-size: 14px;"><span>When Chromium loses focus, CPU usage usually drops to 0% and does not go above 10% - for as long as I am not using Chromium. I am using the i915 / drm kernel modules.. I saw another report of high CPU usage related to using those two kernel modules, but I wasn't able to identify that as the problem in my case.</span></div><div style="font-family: Arial; font-size: 14px;"><span><br></span></div><div style="font-family: Arial; font-size: 14px;"><span>Thanks for the help.&nbsp;</span></div><div style="font-family: Arial; font-size: 14px;"><span><br></span></div>
<div class="protonmail_signature_block" style="font-family: Arial; font-size: 14px;">
    <div class="protonmail_signature_block-user protonmail_signature_block-empty">
        
            </div>
    
            <div class="protonmail_signature_block-proton">
        Sent with <a target="_blank" href="https://proton.me/" rel="noopener noreferrer">Proton Mail</a> secure email.
    </div>
</div>
<div style="font-family: Arial; font-size: 14px;"><br></div><div class="protonmail_quote">
        ------- Original Message -------<br>
        On Saturday, November 26th, 2022 at 8:06 PM, Paul Procacci &lt;pprocacci@gmail.com&gt; wrote:<br><br>
        <blockquote class="protonmail_quote" type="cite">
            <div dir="ltr"><div>Hey,</div><div><br></div><div>Not sure of the problem, but I don't see the correlation between Chrome and any usb driver.<br></div><div>Out of curiosity, have you pulled a usb device one by one until the interrupts disappear?<br><br></div><div>I'd be curious to know which device is slamming the system.</div><div><br></div><div>Thanks,</div><div>Paul<br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Sat, Nov 26, 2022 at 6:02 PM 0x1eef &lt;<a href="mailto:0x1eef@protonmail.com" rel="noreferrer nofollow noopener" target="_blank">0x1eef@protonmail.com</a>&gt; wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div style="font-family:Arial;font-size:14px"><span style="line-height:1.5">Hi, everyone!</span><div style="line-height:1.5"><br></div><div style="line-height:1.5">When I use Chromium, I see a high rate of CPU usage across all four cores. The rate can be anywhere from 20% to 50%, even above that. I am not doing anything intensive, just browsing twitter, reddit, YouTube or GitHub. It has been like this since I installed FreeBSD, but since it's not a blocker I have been lazy about looking into it.</div><div style="line-height:1.5"><br></div><div style="line-height:1.5">I don't know why it happens. I can see that there are a high number of interrupts on 'xhci0', and that seems to carry over to each CPU core as well:</div><div style="line-height:1.5"><br></div><div style="line-height:1.5"><span># vmstat -i            </span><div><span>interrupt                          total       rate</span></div><div><span>irq1: atkbd0                          50          0</span></div><div><span>irq9: acpi0                          403          0</span></div><div><span>cpu0:timer                      30716618         98</span></div><div><span>cpu1:timer                      25457926         81</span></div><div><span>cpu2:timer                      34344531        109</span></div><div><span>cpu3:timer                      25542867         81</span></div><div><span>irq128: xhci0                  328107434       1044</span></div><div><span>irq130: nvme0:admin                   15          0</span></div><div><span>irq131: nvme0:io0                 701041          2</span></div><div><span>irq132: nvme0:io1                 692045          2</span></div><div><span>irq133: nvme0:io2                 792760          3</span></div><div><span>irq134: nvme0:io3                 693091          2</span></div><div><span>irq135: hdac0                    1718425          5</span></div><div><span>irq136: vgapci0                  6273295         20</span></div><div><span>Total                          455040501       1448</span></div><span></span><br></div><div style="line-height:1.5"><br></div><div style="line-height:1.5"><span># dmesg | grep xhci0</span><div><span>xhci0: &lt;Intel Ice Lake-LP USB 3.1 controller&gt; mem 0x95110000-0x9511ffff at device 20.0 on pci0</span></div><div><span>xhci0: 32 bytes context size, 64-bit DMA</span></div><span>usbus0 on xhci0</span><br></div><div style="line-height:1.5"><br></div><div style="line-height:1.5">It might also be helpful to know that I tried OpenBSD on the same computer but it was unusable for a similar reason: 95%+ interrupts on CPU. The impact that had made all tasks extremely slow. On FreeBSD it is not as bad, but I still think  think it is not normal.</div><div style="line-height:1.5"><br></div><div style="line-height:1.5">Can anyone suggest what might be wrong, tips to debug, etc ? If more information is needed, please let me know. Thanks for your time.</div><div style="line-height:1.5"><br></div><div style="line-height:1.5">Best,</div><span style="line-height:1.5">0x1eef</span><br></div><div style="font-family:Arial;font-size:14px"><br></div>
<div style="font-family:Arial;font-size:14px">
    <div></div>

            <div><br></div>
</div>
</blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature" dir="ltr">__________________<br><br>:(){ :|:&amp; };:</div>

        </blockquote><br>
    </div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gK0wIYffyGap3mFoEXClIP-k57b-uioxjqsI5T0IaFv6p3SymjqtzfMyjnSY5r1ZNgEbCod8NsqvshcuFYim-v9ELI3p8ZE3U0Nxprxmx9E=>