Re: pkg upgrade, vfs.zfs.arc.free_target, vfs.zfs.arc.sys_free, vm.pageout_oom_seq

From: Mark Millard <marklmi_at_yahoo.com>
Date: Sun, 31 Aug 2025 19:35:35 UTC
On Aug 31, 2025, at 11:42, Graham Perrin <grahamperrin@gmail.com> wrote:

> On 31/08/2025 09:38, Mark Millard wrote:
> 
>> …
>> 
>> It would appear that RAM==4GiBytes without SWAP would not be
>> generally supported by pkg as stands. Testing hw.physmem="4G"
>> without SWAP . . .
>> 
>> OOM KILLS result:
>> 
>> # pkg upgrade -rFreeBSD-ports -fUy
>> Checking for upgrades (1485 candidates): 100%
>> Processing candidates (1485 candidates): 100%
>> Checking integrity...Child process pid=2219 terminated abnormally: Killed
>> 
>> …
> 
> 
> Retry three or more times. The integrity check might succeed.
> 
> (I ran tests, albeit not the same set of FreeBSD-ports packages, with 1 GB memory given to a VirtualBox guest on fast physical storage. Booted from FreeBSD-14.3-RELEASE-amd64-dvd1.iso, installed all components then converted to pkgbase before first boot of the installed system. No swap in that environment.)
> 

Turns out I do not seen to involve adding any packages from
your example to my context: So far, my original set of
packages lead to -fUy failing every time it is tried for
4 GiByte of RAM (no SWAP).

What top shows is Laundry (so: known dirty pages that are
not active) growing until there can not be enough Free RAM
to meet FreeBSD's threshold requirements.

Re-enabling the SWAP and trying without your package
examples being added (so: fewer packages overall), leads
to the Maximum Swap Used being 799716Ki, with the peak
being during later Installing/Extracting activity, not
during the integrity check. So:
(RAM+SWAP) approx.= 4.8 GiBytes (so a fraction under
5 GiBYtes) --instead of a fraction under 6 GiBytes with
the extra packages.

The evidence that I see suggests to me that the required
RAM+SWAP strongly depends on what set of packages there
are to upgrade.


===
Mark Millard
marklmi at yahoo.com