From nobody Tue Mar 03 22:25:11 2026 X-Original-To: freebsd-current@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 4fQVk438p7z6Tjk0 for ; Tue, 03 Mar 2026 22:25:32 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fQVk41B0Wz3vrB for ; Tue, 03 Mar 2026 22:25:32 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-65f94011dfaso10492898a12.0 for ; Tue, 03 Mar 2026 14:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772576724; cv=none; d=google.com; s=arc-20240605; b=IYRgfiOFKa+WMvsyIxWNLp1edPtlnqZ0WKiYs38ayEpBr+zcWI+cCcInKzmMSG/KSb WqNUkVmYK5IR+qf0k9Zi4DQRaHLSUEwnATsC0IjBL7v5aTVD7RwRfzrOHA2IlCbJV9cA iLJ5rtsIakDI8g347cylxf1xyyZ243Kd7dnFU4LGU0sFiXYGAZ0DSkiaEJRUqWHroB1w Qsr4ptTnGlVWjoo1RUrzk2KiV4RxaYKXie5mnu1b2YDcRdLMhc2KoLtEPezGPbVnOilm cLYqdWbmu63LgCmYq2IHEcy0gaDclO/D4ZvaNpBWgqiowIsstlDwxcgak+FMhHYQ/9aO lIWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3LvXCkqzxFt0L9SKKdtheyrVyqRQi1cZAc4ZViv2JEQ=; fh=ZsbAdrDbzopVoKLiyMNks1aphVAAObiIxFRAMTnX8hE=; b=N0mluU51wf7KTXmW9rviq/p1KF9YDvn813ZDOKigNqUTCL0wMzhCumkLeHFLPuIf98 8DHbBbyYhJzPeT9nSUNPLy44XS9pHYGMzLIHSnN7ihjTLhLek3SDRKkstKwJ/z4XFr88 McvweVoOxvAEkGdSlMvvZHW/o7k+5UmVraD4Tfmdkw/2xB6pJ8D0XkrnpO7tnwwX5+q3 GbUwTXH3+hzOPoHYlNylRRWufz/6o4EwwKYf4aTZtWdFbIFmWCKgDcvgt+5NrVjSe35a zXKx+MUX83OS5NUBQKMo8fMZwh7ngxZ5Fd1rOLLD/hmtqgrQBzPc+bAXO68wF9WI+q/I HS0w==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772576724; x=1773181524; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3LvXCkqzxFt0L9SKKdtheyrVyqRQi1cZAc4ZViv2JEQ=; b=aeKjQVAX6pogkM86vcNsizpXf1aY1rMcYOHqw1f1lY9wa0vYimWQMTUOlMpoXVYVjM l9+UH+5bM7Irv0U92JJOR+cnJSP8vgCK5LISZipM4QTAT707tL/4GAXp6hbPJ+/xGDGs eVvNl4bXyL3ImMuvHHIm0TerATve0egid4VWbjavY7BYatZj3HeVe/RtFG2MGo5WDjB0 lVyOkEzTIa0L+/iY5PPF9b8+9GWjN8LpJ1qsbKnMVnsvsAAWRTDqC+dHr9wq3BJv+1bX oP2cjawWDyOstSnbgrBvA9jXYKp0RyLQEqqrITWO6dndXRin1VNurCU7uMFqaYEtQpyV 9Liw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772576724; x=1773181524; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3LvXCkqzxFt0L9SKKdtheyrVyqRQi1cZAc4ZViv2JEQ=; b=TC7NNExYIyxWTEzIq4p7q7CRo7m8WR6cx8u0U3O3v5J2asIIs1ZhNONZTh/ZTw6bWh zYbJSP0ofZci51GxLzQvcDCEdA0JSJQXjsqUuPTvn10qx4k88aUXbum8A01gPhCTzYe9 c1HWuK/q3Aj5Ta4GBu9qf8XWc3HDvRkF3Xs35RcKggzCPLpZZfd/loZn1h4FHLpt7KmB GfXFQg0WPWrOqerQ2Bqg5EfbpRY01KsPG+f5mxba3KczM3WO4laJHACcKGX1U/Pi3vxl Ke8FINlgCPxuvlWTNP77XveeSCdJ8ev4wyyQ9vDRjDPqy6fNoOV1CRSPeszCK/0bXhur zfFg== X-Forwarded-Encrypted: i=1; AJvYcCXhu5mtSxy1BURrB2+X7LeRZtqnoSGOzqYp9bsRRfvdVCdaTsmAAD6YDSAAxKIJ/p5jBpASJBTWkQwgo32Cpos=@freebsd.org X-Gm-Message-State: AOJu0YyaIeTUKhyjO882n1RxCHPBUjHk/WriajvVJdE4X+5FW1ByhGKO JualVykDn5TcIbmmMzYVUPfRNyCP/oKuXQLiZtf3sBkxYMWcVmZ3bahV5JV0oZ2VplsrS6OJHmV 8ga70BamesXhEKBMGG58FA6fnmkwRwJNe X-Gm-Gg: ATEYQzwdpqDkYQphFuDLbEnGFqRK07Qjt6aB5XzgZ2WZ7cgG/Z5/iR2PjY+5GdC7GWQ dJ3dWmwl+dqv7ycdCrNl7GPXbdozCBORuOLeCgFZJGaK4WAhJMLpkdrwqcnhGW+ta62gwW/I98C qpBWl36PxEDRgU6rTR/+GFerS0VLUn7hpd76n3VoqGRwOJQTenaX81imtCaZPcKsTYMQOhd/kMm d9MQQc2neRk3qiiuqzN6cVWozA14TvDoO5gH8VpaqSzB8XxXuKpSeCft7c7UyAtJHuPUP1eBJjd NlOCMSOQf6uMxDuFC5CHKs6+1WlypO3HdMIixMHJ X-Received: by 2002:a05:6402:1441:b0:65c:139:2579 with SMTP id 4fb4d7f45d1cf-65fddafab9dmr10928847a12.15.1772576723785; Tue, 03 Mar 2026 14:25:23 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 References: <22b478c6bad8212c61ca19a983a8e2e4@Leidinger.net> In-Reply-To: From: Rick Macklem Date: Tue, 3 Mar 2026 14:25:11 -0800 X-Gm-Features: AaiRm539m0jErGo_JaaIoQPsMViIzhnsM0zlf6Ipy2tc364GGJFzhxAlgumWEzQ Message-ID: Subject: Re: RFC: How ZFS handles arc memory use To: Doug Ambrisko Cc: Alexander Leidinger , Peter Eriksson , FreeBSD CURRENT , Garrett Wollman , Alexander Motin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4fQVk41B0Wz3vrB X-Spamd-Bar: ---- On Tue, Mar 3, 2026 at 12:33=E2=80=AFPM Doug Ambrisko wrote: > > On Sun, Nov 02, 2025 at 11:48:06AM +0100, Alexander Leidinger wrote: > | Am 2025-10-29 22:06, schrieb Doug Ambrisko: > | > It seems around the switch to OpenZFS I would have arc clean task > | > running > | > 100% on a core. I use nullfs on my laptop to map my shared ZFS /data > | > partiton into a few vnet instances. Over night or so I would get int= o > | > this issue. I found that I had a bunch of vnodes being held by other > | > layers. My solution was to reduce kern.maxvnodes and vfs.zfs.arc.max= so > | > the ARC cache stayed reasonable without killing other applications. > | > > | > That is why a while back I added the vnode count to mount -v so that > | > I could see the usage of vnodes for each mount point. I made a scrip= t > | > to report on things: > | > | Do you see this also with the nullfs mount option "nocache"? > > I seems to have run into this issue with nocache > /data/jail/current/usr/local/etc/cups /data/jail/current-other/usr/lo= cal/etc/cups nullfs rw,nocache 0 0 > /data/jail/current/usr/local/etc/sane.d /data/jail/current-other/usr/lo= cal/etc/sane.d nullfs rw,nocache 0 0 > /data/jail/current/usr/local/www /data/jail/current-other/usr/lo= cal/www nullfs rw,nocache 0 0 > /data/jail/current/usr/local/etc/nginx /data/jail/current-other/usr/lo= cal/etc/nginx nullfs rw,nocache 0 0 > /data/jail/current/tftpboot /data/jail/current-other/tftpbo= ot nullfs rw,nocache 0 0 > /data/jail/current/usr/local/lib/grub /data/jail/current-other/usr/lo= cal/lib/grub nullfs rw,nocache 0 0 > /data/jail /data/jail/current-other/data/j= ail nullfs rw,nocache 0 0 > /data/jail /data/jail/current/data/jail = nullfs rw,nocache 0 0 > > After a while (a couple of months or more). My laptop was running slow > with a high load. The perodic find was running slow. arc_prunee was > spinning. When I reduced the number of vnodes then things got better. > My vfs.zfs.arc_max is 1073741824 so that I have memory for other things. > > nocache does help taking longer to get into this situation. Have any of you guys tried increasing vfs.zfs.arc.free_target? If I understand the code correctly, when freemem < vfs.zfs.arc.free_target the reaper thread (the one that does uma_zone_reclaim() to return pages to the system from the uma keg that the arc uses) should be activated. rick > > Thanks, > > Doug A.