Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2025 16:34:43 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        freebsd-current@freebsd.org
Cc:        freebsd-arm@freebsd.org
Subject:   Re: kernel: warning: total configured swap (493567 pages) exceeds maximum recommended amount
Message-ID:  <86qzu4vazw.fsf@ltc.des.dev>
In-Reply-To: <aRJ1RgThaq5eZNKc@int21h> (void@f-m.fm's message of "Mon, 10 Nov 2025 23:29:10 %2B0000")
References:  <aRJ1RgThaq5eZNKc@int21h>

index | next in thread | previous in thread | raw e-mail

void <void@f-m.fm> writes:
> On a newly installed
> FreeBSD-16.0-CURRENT-arm-armv7-GENERICSD-20251103-088ced14a69b-281661.img
>
> unmodified settings 32GB mmcsd.
>
> fstab entry for swap is:
>
> /dev/label/growfs_swap  none            swap    sw              0       0
>
> swap in top shows:
>
> Swap: 1928M Total, 1928M Free
>
> # sysctl kern.maxswzone
> kern.maxswzone: 0
>
> ??? how to fix/should I fix?

The amount of swap space you can use is limited by the size of the data
structures used to manage it.  These structures must be preallocated
(otherwise we might deadlock trying to allocate more while already low
on memory) and cannot be swapped out (we wouldn't know how to swap them
back in) so getting the size right on a memory-constrained system can be
quite tricky.  If you configure more swap than half the amount that can
be managed, you get the above warning, which you can safely ignore
unless you either need a lot of swap or have very little physical memory
and don't need much swap.

See also <https://reviews.freebsd.org/D53688>.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86qzu4vazw.fsf>