Re: Can not build kernel on 1GB VM

From: Peter Jeremy <peterj_at_freebsd.org>
Date: Sat, 16 Apr 2022 00:25:23 UTC
On 2022-Apr-15 13:49:53 -0400, Michael Wayne <freebsd07@wayne47.com> wrote:
>I have a VM with 1GB RAM running FreeBSD 12.1-RELEASE-p3
>
>I'm trying to upgrade the machine to 12.3 and having swap failures.

Are you using ZFS or UFS and are you swapping to a raw partition
or a file/zvol?

>the machine ran out of swap. with a bunch of messages like:
>   Apr 15 12:11:26 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 240593, size: 4096
>   Apr 15 12:11:35 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 236224, size: 16384
>   Apr 15 12:11:37 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 245, size: 12288
>   Apr 15 12:11:46 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 240593, size: 4096
>   Apr 15 12:11:55 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 236224, size: 16384
>   Apr 15 12:11:57 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 245, size: 12288

That message doesn't indicate "out of swap", in indicates that your
swap device isn't responding within a "reasonable" time. If you are
swapping to a local ZFS file or zvol, you may be running into a known
deadlock condition and should switch to using a raw partition for
swap.  If you can't improve your swap device performance, adjusting
the vm.pageout_oom_seq and vm.pfault_oom_attempts sysctls should
resolve the problem.

A true "out of swap" will appear as a message similar to
swap_pager_getswapspace(nnn): failed

-- 
Peter Jeremy