From nobody Thu Mar 07 18:54:24 2024 X-Original-To: fs@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 4TrJPX3bkCz5Dc4H for ; Thu, 7 Mar 2024 18:54:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TrJPX2Y8Yz4WT5 for ; Thu, 7 Mar 2024 18:54:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709837664; a=rsa-sha256; cv=none; b=scPnlXnjhe6m9yAmtubFAOZw+CGaSxEHFw1tW3HKh0Gi6uMlomXr8vFJHpfYXZp/sHLzYl 0xc2faY1huxkNLPU7Qzb3p3IGZiw6DCVlMtna6V0JcR4Yj6fUIlyQLadH857QaxX2xiIGQ +P0Eoftp/jNdhoEUktHyNUm+bsS/iQsaXIWhO50e6u7Qu1mXSd2T5Aw5Bn0ST52YRtzmEu Ex4HaOWABSZx82azIUQP+G6kxmjB3Qu+LlRHIYhwJIu0ipcWJyEygXYtI7QS3cA9AP50T+ w6n3JAMqacqxf2vkDUmUuFQiFHpOW3mAwge6qv3pBMVzZ/sS1sqfTDZ5ZFJmUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709837664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DYy37x1Q+qEHRQCJOwqVMxDoADYQ5BGyVDQvWTRb3tE=; b=u92ApCWGFtEjRMUIBeguzqgc32erUaEplF5avd9wLbNyUnke6yLRxPbTys6f9ZJVpLZESj +RJZUz8lkwV1wfziWFPmOHWMbzhC2eMa0h50vZv8AbnLOPtnBa0JllzbfEEh8SLU/3KKKr tdq6tVR8+J1bHmtuot96LAAQLxsWS+Ab09QqtW3+sTK8mEp13pu1Nj7ToFb4bt53TElB/D RLW1c9pavcsCZSxqqDhrrStpPR8gsp/hWNgVpxSU1SVb1fBuJmmjvJLGmIdu13JPT2+XU6 9XL0lDnWRIWwNOcihKXLhiPrVdt6pyjS2Fs7ebUzKXdJ9wp0/kQrEU2GW8rZZw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TrJPX26DRzmgb for ; Thu, 7 Mar 2024 18:54:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 427IsOuS053621 for ; Thu, 7 Mar 2024 18:54:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 427IsOmo053619 for fs@FreeBSD.org; Thu, 7 Mar 2024 18:54:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 275594] High CPU usage by arc_prune; analysis and fix Date: Thu, 07 Mar 2024 18:54:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vsasjason@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275594 --- Comment #81 from Anton Saietskii --- (In reply to Anton Saietskii from comment #73) After applying patches onto releng/13.3 (without any sysctl tuning) works l= ike a charm so far! I can't even see neither arc_prune nor vnlru in top now, on= ly a bit a pagedaemon (which eventually may eat up to 100%, but not for long and without stalling system), snip follows: last pid: 77896; load averages: 2.34, 4.42, 4.76; battery: 100%=20=20= =20=20=20=20=20=20=20=20=20=20 up 0+02:36:12 19:29:16 1089 threads: 10 running, 1049 sleeping, 30 waiting CPU 0: 4.7% user, 0.0% nice, 14.1% system, 0.0% interrupt, 81.2% idle CPU 1: 6.3% user, 0.0% nice, 20.9% system, 0.0% interrupt, 72.8% idle CPU 2: 19.9% user, 0.0% nice, 17.3% system, 0.0% interrupt, 62.8% idle CPU 3: 12.8% user, 0.0% nice, 9.7% system, 0.0% interrupt, 77.4% idle CPU 4: 23.6% user, 0.0% nice, 14.7% system, 0.0% interrupt, 61.8% idle CPU 5: 18.8% user, 0.0% nice, 11.5% system, 0.0% interrupt, 69.6% idle CPU 6: 13.1% user, 0.0% nice, 12.6% system, 1.0% interrupt, 73.3% idle CPU 7: 10.6% user, 0.0% nice, 18.0% system, 0.5% interrupt, 70.9% idle Mem: 101M Active, 998M Inact, 1600M Laundry, 58G Wired, 524K Buf, 1651M Free ARC: 55G Total, 29G MFU, 25G MRU, 83M Anon, 225M Header, 617M Other 52G Compressed, 53G Uncompressed, 1.02:1 Ratio Swap: 8192M Total, 8192M Free PID JID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 77368 5 pbuild 100 0 106M 73M CPU6 6 0:25 99.87% /usr/bin/tar -xf /portdistfiles//firefox-123.0.1.source.tar.xz --no-same-ow= ner --no-same-permissions (bs 472 0 root 52 -20 375M 205M vmidle 2 87:38 59.19% bh= yve: wifibox (bhyve){vcpu 0} 1677 0 transmissi 52 0 488M 286M kqread 1 67:36 51.56% /usr/local/bin/transmission-daemon -g /usr/local/etc/transmission/ -e /var/log/transmission.log -x /var/ 472 0 root 20 -20 375M 205M uwait 5 7:44 5.01% bh= yve: wifibox (bhyve){e82545-5:0 tx} 7 0 root -16 - 0B 48K psleep 6 2:16 4.77% [pagedaemon{dom0}] 472 0 root 20 -20 375M 205M kqread 4 6:48 4.15% bh= yve: wifibox (bhyve){mevent} 12 0 root -88 - 0B 480K WAIT 6 1:40 0.68% [intr{irq128: ahci0}] 0 0 root -16 - 0B 11M - 4 0:02 0.54% [kernel{z_rd_int_1_2}] 0 0 root -16 - 0B 11M - 7 0:15 0.47% [kernel{z_rd_int_0_1}] 69 0 root 20 - 0B 16K geli:w 7 0:32 0.40% [g_eli[7] diskid/DIS] And a shorter snip during actual Fx build: Mem: 5844M Active, 1941M Inact, 2457M Laundry, 50G Wired, 524K Buf, 1666M F= ree ARC: 47G Total, 27G MFU, 19G MRU, 67M Anon, 192M Header, 581M Other 44G Compressed, 45G Uncompressed, 1.02:1 Ratio Swap: 8192M Total, 62M Used, 8130M Free PID JID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 10614 5 pbuild 103 0 3632M 2803M CPU3 3 0:28 99.94% /usr/local/bin/rustc --crate-name style --edition=3D2018 servo/components/style/lib.rs --error-format=3Djson 472 0 root 52 -20 375M 205M vmidle 5 98:39 54.51% bh= yve: wifibox (bhyve){vcpu 0} 1677 0 transmissi 48 0 488M 283M kqread 2 74:52 30.67% /usr/local/bin/transmission-daemon -g /usr/local/etc/transmission/ -e /var/log/transmission.log -x /var/ 472 0 root 20 -20 375M 205M RUN 0 8:42 5.37% bh= yve: wifibox (bhyve){e82545-5:0 tx} 472 0 root 20 -20 375M 205M kqread 6 7:35 4.02% bh= yve: wifibox (bhyve){mevent} A bit of swap being used, but again: works like a charm, no stalls at all. Seigo, thanks a lot for you effort, I do greatly appreciate it! --=20 You are receiving this mail because: You are the assignee for the bug.=