From nobody Sat Nov 26 23:06: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 4NKSDM2F3Tz4jKNy for ; Sat, 26 Nov 2022 23:12:03 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) (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 4NKSDM0MvYz4XTN for ; Sat, 26 Nov 2022 23:12:03 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-12c8312131fso9103157fac.4 for ; Sat, 26 Nov 2022 15:12:03 -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=DHY6iSpBNa4n/UpTIqsOmIRvexUJiRlR46yXYG/RiCU=; b=MNGterHENK34L2Qof4zO/sPrM0jRLmafNaFeP0t/Iqky0w5NxhEOW8c//FidxWv2Jn 9RiF/uyF9UqJaCecrq8w0bEMuHpa2jI2AU3p7GHdr7dVFUaQqPu3nXsw3rZqB33WvqE4 cIpy3F7iEr5G30477mAScAYRysCvpQVJbJ65uh+WpjVo3ZfklcK6K8roGUhWMGCTvWjo 1TVFqaUpjZ2PCe5ap+qNiogKHVIIyOxzBGOpf96Eg5dX7GUDsvOhzCeo7GKweYxJSwxv mNOA44kenw51RHLLbYn7YLBaRiGovoKoj3d3yWg+Xe+CeewpqxwLl4Jg/6lvF4J0Wzn2 saog== 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=DHY6iSpBNa4n/UpTIqsOmIRvexUJiRlR46yXYG/RiCU=; b=tlj1FdD4WAT0H/uKxeUevGnujZasGgjHsK/zM348evczBYamAHfrJWSLlfmOo7CMD4 YazIS/UKo8uZ+2n8XntYQ0gXK4GYhA80apzew1CRGit6bt91YHYwoJAUJVIFsIjHdx3z 2S2QciIkax7PaZFoz/JFWhMlSvHqZiixV5zotNDxK9lzPF5ExdZJPd55SAeQzy5X5UBF RPHNJlCX+b54izBRklcVciCdWBTvBMssgp2sN0tZOZWmu4Rxfd1dkZE8a/ithlcagSpl VoY8F1rlhGK8BNE2Occ3zeFwqYhslLajrpz7HbYh0dsH/d5IzkN+Ccz98uTZRfSxyqcv rJ0w== X-Gm-Message-State: ANoB5pkY62awASU91SBd9zLfR6bOb3EXfzzBXOrOykZyDq7PFhnpqK6A vSAFvfLv1nMzlyYdSyUN8njhiufD0XAt2OcOoAodE74= X-Google-Smtp-Source: AA0mqf7URCNNeVVonVhCkx2ZQ+tCuYZsbz+68W0Tz/F9URGAS7XgxhmYJRIec/XmCq7W4h1SR8aDjfPrSWdP7i/ExJ0= X-Received: by 2002:a05:6870:7b89:b0:13c:e644:d7a9 with SMTP id jf9-20020a0568707b8900b0013ce644d7a9mr26802298oab.148.1669503991439; Sat, 26 Nov 2022 15:06:31 -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 18:06: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="0000000000005c678205ee67b03a" X-Rspamd-Queue-Id: 4NKSDM0MvYz4XTN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000005c678205ee67b03a Content-Type: text/plain; charset="UTF-8" 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 > > > -- __________________ :(){ :|:& };: --0000000000005c678205ee67b03a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 whi= ch 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 rat= e 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 l= ike this since I installed FreeBSD, but since it's not a blocker I have= been lazy about looking into it.

<= /div>
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 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
interrupt =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0total =C2=A0 =C2=A0 =C2=A0 rate
irq1: atkbd0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A050 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00
= irq9: acpi0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0403 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00
cpu0:timer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A030716618 =C2=A0 =C2=A0 =C2=A0 =C2=A0 98
cpu1:timer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A025457926 =C2=A0 =C2=A0 =C2=A0 =C2=A0 81
cpu2:timer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A034344531 =C2=A0 =C2=A0 =C2=A0 =C2=A0109
cpu3:timer =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A025542867 =C2=A0 =C2=A0 =C2=A0 =C2=A0 81
irq128: xhci0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0328107434 =C2=A0 =C2=A0 =C2=A0 1044
irq130: nvme0:admin =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 15 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00
ir= q131: nvme0:io0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 701= 041 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02
irq132: nvme= 0:io1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 692045 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A02
irq133: nvme0:io2 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 792760 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A03
irq134: nvme0:io3 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 693091 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A02
irq135: hdac0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01718425 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A05
irq136: vgapci0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A06273295 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 20
Total =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0455040501 =C2=A0 =C2= =A0 =C2=A0 1448


# dmesg | grep xhci0<= /span>
xhci0: <Intel Ice Lake-LP USB 3.1 controller> mem 0x= 95110000-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 compu= ter but it was unusable for a similar reason: 95%+ interrupts on CPU. The i= mpact that had made all tasks extremely slow. On FreeBSD it is not as bad, = but I still think=C2=A0 think it is not normal.

Can anyone suggest what m= ight be wrong, tips to debug, etc ? If more information is needed, please l= et me know. Thanks for your time.

<= /div>
Best,
0x1eef
=
=20



--
__________________

:(){ :|:& };:
--0000000000005c678205ee67b03a--