From nobody Sat Dec 9 16:15:17 2023 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 4SnY521KFsz54DHS for ; Sat, 9 Dec 2023 16:15:18 +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 4SnY520H8zz4BNT for ; Sat, 9 Dec 2023 16:15:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702138518; a=rsa-sha256; cv=none; b=jePqeJXz/wfMP5c1amNsyeUo80EQ1UDgHoYhADR9zykIVMJJVJX3PFhGYZvoegZbynDJqS YrP/0sFCzk+cG8OnFcLpRPjqvLRZ0V6DRGHzoHKVpGKZ+5g6FPRud4xnhqVfhrXcBQ3yYx 3E9R34lJeKTt2dJyOFoi5CVpJi7rK6a1/4BqXr9FXwsqgyzGK2pT9Vgv2ME//X8uxhIyPU 4XvxkLvceB8kfpyYVYo14gDEoGuREjcTHMXgMQpPhRQXG04/vnHfdseZrdgH6mkYRmK3gw ui02virOfkV/pMUMU3QyxaACc2k3EEdJvU/KVA8SvWQXxqJNRHFbKQn0s0O8Mg== 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=1702138518; 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=CIDAxhHOFRflG4UIVkAaF0QQyBZ6wVs8JM0z1y7qXVE=; b=cHyygYXf8MMksrYMkeEU82oiBQK+BiyuuJyv/QmF6x7TqsZMBo9toB9kJJbbwB+dIoSZJX 1T6eeAO1zcP//73OyvhIpqdYr8QGMBZqEwXi+0mhVpw7KmQzuz3A4iZdTDPr60GgWSF2wY ps80LV85tzlJtx2hHZDOE4hm3ZYkNx2y7dEN4DV1CFLDPw2E7pT9o4bsOlIMIS/9LmYrZ5 Iry4tt8Oj+dEFQbHQvoWeXOj78XTiuz5f+2skF5vRoXTyLRod0OKZ8iAwawtiUJOFflY95 w7dign0pDm0KrG25XGbwNh5ZEO20C0ZIxupCvyUPPIIFXzcgLblUeJ3UdLoA5A== 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 4SnY5169Xhz1BHB for ; Sat, 9 Dec 2023 16:15:17 +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 3B9GFHdF076551 for ; Sat, 9 Dec 2023 16:15:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3B9GFHrI076550 for fs@FreeBSD.org; Sat, 9 Dec 2023 16:15:17 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: Sat, 09 Dec 2023 16:15:17 +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: markj@FreeBSD.org 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 #9 from Mark Johnston --- > I thought you would say that; I almost thought of the same thing more tha= n 20 years ago while implementing the initial version of vnlru along with M= att Dillon :) > > The per-mountpoint / per-filesystem vnode design has at least two challen= ges: > > A) Balancing the vnodes across the mountpoints / filesystems, and > B) Splitting the name cache. > > I suspect B) is the more difficult one. As of now, the global name cache= allows the vnode lookup in a single place with just one pass. I'm not a VFS expert by any means, but I don't see what this has to do with= the name cache. vnodes live on a global list, chained by v_vnodelist, and this list appears to be used purely for reclamation. Suppose we instead use a per-mountpoint LRU (and some strategy to select a mountpoint+num vnodes to reclaim) instead. How would this affect the name cache? > The interval between the ARC pruning executions is much more simple and y= et effective, under my key findings out of the first test in the descriptio= n: 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 memory.= If arc_prune() is spending most of its time reclaiming tmpfs vnodes, then it d= oes nothing to address its targets; it may as well do nothing. Rate-limiting j= ust gets us closer to doing nothing, or I am misunderstanding something about t= he patch. Suppose that arc_prune is disabled outright. How does your test fare? --=20 You are receiving this mail because: You are the assignee for the bug.=