pkg upgrade, vfs.zfs.arc.free_target, vfs.zfs.arc.sys_free (was: CFT: pkgbase support in 15.0)

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Sat, 30 Aug 2025 02:46:35 UTC
<https://lists.freebsd.org/archives/freebsd-pkgbase/2025-May/000543.html>

On 30/05/2025 17:02, Mark Millard wrote:

> … Did you do any tuning of the ZFS-in-use examples

Recent test results, with a VirtualBox snapshot of:

- FreeBSD 14.3-RELEASE-p2, AMD64, 525 packages from FreeBSD-base

- x11/kde, x11/sddm, x11/xorg,and ten others from FreeBSD-ports

- all packages cached – pkg upgrade -fFqy, repeatedly.


pkg upgrade -fUy

a) failed at least once with 12 GB memory without tuning

b) succeeded at least once with 13 GB without tuning

c) succeeded at least twice with 2 GB, ARC tuned.


Failure (a): <https://i.imgur.com/YKhwv8O.png>


Temporarily set before (c):

sysctl vfs.zfs.arc.free_target=256000


Success here means _not_ encountering:

> Child process … terminated abnormally: Killed

– with /var/log/messages showing the pkg context:

> killed: failed to reclaim memory

----

I can not compare with 15.0-PRERELEASE until after completion of 
p9652f95ce8e4_sb45a181a74c main-amd64 on beefy18, 
<https://pkg-status.freebsd.org/beefy18/build.html?mastername=main-amd64-default&build=p9652f95ce8e4_sb45a181a74c>. 


Comparison with 15.0-ALPHA1 will be more meaningful.

Not yet tested: vfs.zfs.arc.sys_free in lieu of vfs.zfs.arc.free_target