From nobody Sun Nov 27 03:31:19 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NKYzn5NW3z4hscg for ; Sun, 27 Nov 2022 03:31:33 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NKYzn2svQz3mM8 for ; Sun, 27 Nov 2022 03:31:33 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x22d.google.com with SMTP id h132so8337720oif.2 for ; Sat, 26 Nov 2022 19:31:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=U/9+QymB1oq2cf4MThIozxVqlc3+CsOJPbNrsHsDgrg=; b=AD9uU2guOPE+8ZFm2e2rhg0IyDNXyJeMA3fXnfRL5huT9fye3KOjMSell4weH0Z1QP 2lMS++Y9I2MvslhgCj6/24Dee1zvPEVqx1HRnPcL1J9t1fe5IvdV//jRaeclAgpd9ELZ M4/o9zxl7PvTStQVaFvV1QMn1pNVvI06G9HkYqOL/QWawim8SaPzMAzgyKvsTARN9NXb 2A57vew2sae5+bjakddIRbwKVgkgnveSiReAiluR3mDHIQ53bgo5lokY5jOgIzk2rGXX ME85ofVmo2hw2SuvKjxMDx7GEaXQ5ebexcVtepX8pPg/LrPYXkITu//LfpSQ6D4R+kgF Mbsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=U/9+QymB1oq2cf4MThIozxVqlc3+CsOJPbNrsHsDgrg=; b=2X+SNzZLRw/DLRBOjI9jQphpNIfjIAOkDzozKnmrFiFhyefP44bzGYOCl7zvF8xL3+ wAI0/s2Y2R4sMFMAunnh+oUb6RCMx7s4zSgmjQfYBbAj/6koG/F1gNizQ6epkyCQhj6x kofRPWD92ZmkGRqGIg9BKxrdmfaoZpwL0vTwYGVBYtGONjFru/LTilTroip1na2/+M3l ibZ1IqzZHJcgSnjH2TkQ6y18xxGX8miFkC6Sh0lXef6nWbeS/vLFDCCw5WZnKUVp6ATq uR0ZlE263zskBr76Opm+XnfgLxtqE4TWa3oiZ5hCcAMXzO5/7F9HLoi8Z1v93GafgU8m w66w== X-Gm-Message-State: ANoB5plTXveRQmIEAgQEGETuEtU7VH0IhmrwVnqJfEDEy23dIaQ4Yut7 Gcme8JCr0JyOjg7ha5jCpNnirnJquVwJQMlxElp6CdIYxg== X-Google-Smtp-Source: AA0mqf4SfnYHrL1t3YcJsNd8/cCL98ILQ3799Spzb3ZHO+ln0hJUUAr/zk8lGQWtfQ1VrFopSvAK6hZF+frtjeZOfr0= X-Received: by 2002:a05:6808:118c:b0:350:4233:73f9 with SMTP id j12-20020a056808118c00b00350423373f9mr13004513oil.225.1669519892379; Sat, 26 Nov 2022 19:31:32 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Paul Procacci Date: Sat, 26 Nov 2022 22:31:19 -0500 Message-ID: Subject: Re: High CPU usage / high number of interrupts To: 0x1eef <0x1eef@protonmail.com> Cc: "freebsd-questions@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000217bcd05ee6b64eb" X-Rspamd-Queue-Id: 4NKYzn2svQz3mM8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000217bcd05ee6b64eb Content-Type: text/plain; charset="UTF-8" usbconfig dump_stats Can you provide the output of the above? Run that a couple of times if you don't mind and do your very best to provide any rates of increases for any of the fields. An estimation would be perfectly fine. Thanks, Paul On Sat, Nov 26, 2022 at 10:09 PM 0x1eef <0x1eef@protonmail.com> wrote: > > Can you determine if irq 128 is being shared by any devices? > > I couldn't determine that from dmesg.boot, but I think there could be some > useful information in that file. I attached the file to this e-mail. Thank > you! > > Best, > 0x1eef > > Sent with Proton Mail secure email. > > ------- Original Message ------- > On Saturday, November 26th, 2022 at 8:49 PM, Paul Procacci < > pprocacci@gmail.com> wrote: > > Can you determine if irq 128 is being shared by any devices? > Usually this information can be found in `dmesg' or '/var/run/dmesg.boot'. > > vmstat indeed shows a device but it sometimes doesn't show all the devices > sharing that IRQ. It's possible you're being misled by vmstat. > Just trying to get the complete picture here of devices. ;) > > Thanks, > Paul Procacci > > On Sat, Nov 26, 2022 at 6:21 PM 0x1eef <0x1eef@protonmail.com> wrote: > >> 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 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: mem 0x95110000-0x9511ffff >>> at device 20.0 on pci0 >>> xhci0: 32 bytes context size, 64-bit DMA >>> usbus0 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 >>> >>> >>> >> >> -- >> __________________ >> >> :(){ :|:& };: >> >> >> > > -- > __________________ > > :(){ :|:& };: > > > -- __________________ :(){ :|:& };: --000000000000217bcd05ee6b64eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
usbconfig dump_stats
Can you= provide the output of the above?=C2=A0 Run that a couple of times if you d= on't mind and do your very best to provide any rates of increases for a= ny of the fields.=C2=A0 An estimation would be perfectly fine.

Thanks,
Paul

= On Sat, Nov 26, 2022 at 10:09 PM 0x1eef <0x1eef@protonmail.com> wrote:
>=C2=A0Can you determine if irq 128 is being shared by any devices?

I couldn't determine that from dmesg.boot, but I think ther= e could be some useful information in that file. I attached the file to thi= s e-mail. Thank you!

Best,
0x1eef
<= div style=3D"font-family:Arial;font-size:14px">
=20
=20
Sent with Proton Mail secure email.


On Sat, Nov 26, 2022 at 6:21 P= M 0x1eef <0x1eef@protonmail.com> wrote:
<= /div>
Hi !

> Out of curio= sity, have you pulled a usb device one by one until the interrupts disappea= r?

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

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

When Chromium loses focus, CPU usage usually drops to 0% a= nd does not go above 10% - for as long as I am not using Chromium. I am usi= ng the i915 / drm kernel modules.. I saw another report of high CPU usage r= elated 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 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 us= b 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.

Than= ks,
Paul

On Sat, Nov 26, 2022 at 6:02 PM 0x1eef <0x1eef@protonmail.com> wrote:
Hi, everyone!

When I use Ch= romium, 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 inten= sive, just browsing twitter, reddit, YouTube or GitHub. It has been like th= is since I installed FreeBSD, but since it's not a blocker I have been = lazy about looking into it.

<= div style=3D"line-height:1.5">I don't know why it happens. I can see th= at 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 d= evice 20.0 on pci0
xhci0: 32 bytes context size, 64-= bit DMA
usbus0 on xhci0

It might also be hel= pful 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 t= ime.

Best,
0x1eef




--
__________= ________

:(){ :|:& };:



--
= __________________

:(){ :|:& };:



--
__________________

:(){ :|:& };:
--000000000000217bcd05ee6b64eb--