Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 2023 20:12:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        sysinstall@FreeBSD.org
Subject:   [Bug 251993] sysinstall: Can create swap partition size that generates kern.maxswzone warning
Message-ID:  <bug-251993-8135-C9L9xtRvTQ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-251993-8135@https.bugs.freebsd.org/bugzilla/>
References:  <bug-251993-8135@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251993

--- Comment #9 from Ed Maste <emaste@freebsd.org> ---
(In reply to Kubilay Kocak from comment #8)

The warning was added in:

commit 3ff863f1aa52963ea55487477573f70caa275a94
Author: Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org>
Date:   Thu Aug 16 08:29:49 2012 +0000

    - When running out of swzone, instead of spewing an error message every
      tick until the situation is resolved (if ever), just print a single
      message when running out and another when space becomes available.

    - When adding more swap, warn if the total amount exceeds half the
      theoretical maximum we can handle.

Notes:
    svn path=3D/head/; revision=3D239327

I suspect the real issue is:
> real memory  =3D 268435456 (256 MB)
Typical installations likely involve a minimum of 1GB of RAM, or maybe 512M=
B.

The installer's swap size default is set by:
#define SWAP_SIZE(available)   MIN(available/20, 4*1024*1024*1024LL)

> What might a suitable patch look like or do?

Could be one or more of:
- add another limit to the SWAP_SIZE MIN(), so that we'd choose less swap f=
or
this installation (either "real memory" or the vm.swap_maxpages sysctl)
- have the installer produce a warning when run on a system with less than
512MB of RAM=20
- instead of emitting a warning from the kernel, just ignore (do not use)
provided swap space that's above what kern.maxswzone permits

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251993-8135-C9L9xtRvTQ>