From nobody Tue Nov 11 16:46:47 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d5XTg3SPJz6GhVc; Tue, 11 Nov 2025 16:45:43 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "pelorus.zefox.org", Issuer "pelorus.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d5XTg0GJrz3ffq; Tue, 11 Nov 2025 16:45:42 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.18.1/8.18.1) with ESMTPS id 5ABGklC3024211 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 11 Nov 2025 08:46:47 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.18.1/8.18.1/Submit) id 5ABGklrp024210; Tue, 11 Nov 2025 08:46:47 -0800 (PST) (envelope-from fbsd) Date: Tue, 11 Nov 2025 08:46:47 -0800 From: bob prohaska To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: freebsd-current@freebsd.org, freebsd-arm@freebsd.org Subject: Re: kernel: warning: total configured swap (493567 pages) exceeds maximum recommended amount Message-ID: References: <86qzu4vazw.fsf@ltc.des.dev> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86qzu4vazw.fsf@ltc.des.dev> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d5XTg0GJrz3ffq On Tue, Nov 11, 2025 at 04:34:43PM +0100, Dag-Erling Smørgrav wrote: > > 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 . So I'm flirting with trouble on a system (Pi2/armv7 FWIW) reporting warning: total configured swap (1024000 pages) exceeds maximum recommended amount (467488 pages). warning: increase kern.maxswzone or reduce amount of swap. ? I'm seeing random silent hangs (no debugger escape) but they happen when swap use is much less than half the physical maximum, sometimes less than 50 MB. Highest peak use is generally less than 700 MB, usually much less. Thanks very much for writing! bob prohaska