Re: Can not build kernel on 1GB VM

From: Michael Wayne <>
Date: Mon, 16 May 2022 14:37:53 UTC
More info. I am running UFS so the ZFS should not be an issue

   % pstat -s
   Device          1K-blocks     Used    Avail Capacity
   /dev/md99         1048576        0  1048576     0%
   % df
   Filesystem      1K-blocks     Used   Avail Capacity  Mounted on
   /dev/ufs/rootfs  25388500 17630840 5726580    75%    /
   devfs                   1        1       0   100%    /dev

On Sat, May 14, 2022 at 08:02:29AM -0700, Mark Millard wrote:
> The way to know if out of swap might actually be involved
> in the context are some other messages that do not of
> themselves announce kills:
> swap_pager: out of swap space
> swp_pager_getswapspace(. . .): failed
> If you are getting either of those 2, then you are actually
> running out of swap space. Otherwise you are not.

I am not getting either of those. Watching swap as ctfmerge runs up 
confirms that I am likely not running out of swap.

Note also that I continue to run a kernel built with the suggested patch to 

> If you are not the real reason is one of 4:

Likely the swap device isn't responding within a "reasonable" time.  (from another mail in this chain)

> FYI:
> kernel: swap_pager: indefinite wait buffer: bufobj: . . ., blkno: . . ., size: . . .
> is for a swap read taking over 20 seconds (including
> time when queued but waiting in the queue to start
> the transfer).

I got this message on 12.1. I am not getting it on 12.3

> /boot/loader.conf can use the likes of:
> vm.pageout_oom_seq=120
> vm.pfault_oom_attempts=-1
> #vm.pfault_oom_attempts= 3
> #vm.pfault_oom_wait= 10
> I do not know if you have tried any of these.

Quoting one of my old emails:
   On 12.1 I used sysctl to set
   >    vm.pageout_oom_seq=120
   >    vm.pfault_oom_attempts=-1
   > There was no improvement. I still see processes getting killed due
   > to no swap space despite only 7-8 MB being reported used.  It sorta
   > feels like it's not really able to use swap at all.
   > Note that everything worked fine on 11.x, this is a new issue on 12.

I have not tried this on 12.3, nor have I tried the other two.  Will do.