From nobody Fri Jan 12 03:10:31 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 4TB63r2Tvjz57F5j for ; Fri, 12 Jan 2024 03:10:32 +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 4TB63r1S2Xz4rr4 for ; Fri, 12 Jan 2024 03:10:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705029032; 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=nXEmBmFCoyxto7A8GFxzM2N//2H1AJnAvwbDa6qtcKw=; b=pEYghWGTsdrWqWAB6len5117HFk8nMjKyg+/zC9MEZ0TGQE/FqHWsv2pCGvl2D0bAm++hg QRrPAGINQ1SVuCPAoEE3eC0/1/z/YjedA5ksFlsC+ryq0bYKmvU1J8aI1w8+ApYm4t+6AS leuQf1Iw7zRnZcEk8dUCdO9uf6QOAadmLSLhFxnKWwNOdlVoaor78kLhJ43/BFQXbHIsTu lL/DoDZJcqkVNOe5hLiXQkOtl6kmZyI3q2lJhodiP6FVw4XPe9ur/iNBQX/3ozyqKhhVaI wYKeZ/IZ1gUPCcvRPlYoe05uaq2koW1ANWLR1Wf5NC7wRHVcRufN7pdc8xrpVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705029032; a=rsa-sha256; cv=none; b=LP2oqAap/tusekQyzulONRq298BckxLUp0eMx102zuQNBAfTp/wqjFoTx7P+uWTQUmI56y gy2pQrK2bhbtFLNqXxhzlRVHqQ+W4RGDEJ5K6tQAjBjml3RvABqy+XRvA8o9Z+Nz2M609o xM2aEZHZZwwnPAhDJSjsA0s5xaUUtJI+Lcmm3wI9HnJJaw9KB7chXu85Zxy9wEPRIJbcIn tCIY5LLN4fNq0jTNt1/uocpwDxrwyFFYI5MjtQcF1h1+juI4E3/rUqEOi4WnKVkWTKFtCX QVszkfgirB/Y7FBgQ7WSL/lvYBurNfxRQ6yh2vasC/ef4Yq3rlgG9J/d+grVUA== 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 4TB63r0N0nzlbp for ; Fri, 12 Jan 2024 03:10:32 +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 40C3AVBD011866 for ; Fri, 12 Jan 2024 03:10:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40C3AVkC011862 for fs@FreeBSD.org; Fri, 12 Jan 2024 03:10:31 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: Fri, 12 Jan 2024 03:10:31 +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: seigo.tanimura@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 #31 from Seigo Tanimura --- (In reply to Mark Johnston from comment #9) Now with the somewhat better answer: > Sorry, I don't understand. The trigger for arc_prune is whether the ARC = is holding "too much" metadata, or ZFS is holding "too many" dnodes in memo= ry. If arc_prune() is spending most of its time reclaiming tmpfs vnodes, t= hen it does nothing to address its targets; it may as well do nothing. Rat= e-limiting just gets us closer to doing nothing, or I am misunderstanding s= omething about the patch. The rate limiting in my fix now comes with the maximum and optimal workload= .=20 That is required because both the overcommit and undercommit of the ARC pru= ning waste the CPU time by the effortless vnode list lock and the overhead to ca= ll vnlru_free_impl(), respectively. The elimination of the giveups in vnlru_free_impl() and the prunable znodes under zfs_arc_dnode_reduce_percent are the positive evidences. The pileup of the ARC metadata with no evictable portion should still be investigeted, as that is the direct cause of the out-of-control ARC pruning requests. The unevictable ARC content is caused by the ZIO on it, but it is not clear how the ZIO keeps running so long. --=20 You are receiving this mail because: You are the assignee for the bug.=