Date: Tue, 11 Nov 2025 09:22:45 -0800 From: Mark Millard <marklmi@yahoo.com> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org> Cc: freebsd-current@freebsd.org, freebsd-arm@freebsd.org, bob prohaska <fbsd@www.zefox.net> Subject: Re: kernel: warning: total configured swap (493567 pages) exceeds maximum recommended amount Message-ID: <59321C66-9B02-448D-A275-500857BEF641@yahoo.com> In-Reply-To: <86qzu4vazw.fsf@ltc.des.dev> References: <aRJ1RgThaq5eZNKc@int21h> <86qzu4vazw.fsf@ltc.des.dev>
index | next in thread | previous in thread | raw e-mail
On Nov 11, 2025, at 07:34, Dag-Erling Smørgrav <des@FreeBSD.org> wrote: > 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>. > man 8 loader_simp reports: kern.maxswzone . . . Note that swap metadata can be fragmented, which means that the system can run out of space before it reaches the theoretical limit. Therefore, care should be taken to not configure more swap than approximately half of the theoretical maximum. . . . === Mark Millard marklmi at yahoo.comhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59321C66-9B02-448D-A275-500857BEF641>
