Jeremy Chadwick
2018-Mar-02 08:23 UTC
total configured swap pages exceeds maximum recommended amount
I am not subscribed to -stable, so please keep me CC'd. I am CC'ing folks who have touched this code or dealt with it recently or in the past. Something has changed regarding how FreeBSD determines when to emit this message. I do not know if this is a regression. The message below comes from a stable/11 r330260 amd64 box w/ 8GB RAM and 32GB swap during boot: warning: total configured swap (8358563 pages) exceeds maximum recommended amount (8141112 pages). warning: increase kern.maxswzone or reduce amount of swap. In stable/9, the message could be squelched via kern.maxswzone="0" in loader.conf. Confirmation is here (see Dag-Erling's responses): https://lists.freebsd.org/pipermail/freebsd-stable/2012-August/069301.html In stable/11, this no longer appears to work (the default value is 0). The reason this box has 32GB swap (4x more than existing RAM) has to do with planning ahead. The system can support up to 32GB RAM, but does not have all the DIMM slots populated at this time. Swap on this machine is a physical partition on its main disk, thus "shrinking swap" is not not possible without a full format/reinstall. This code has been touched/tweaked semi-recently in PR 221356: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221356 Code references: stable/9: https://svnweb.freebsd.org/base/stable/9/sys/vm/swap_pager.c?annotate=284100#l2132 stable/10: https://svnweb.freebsd.org/base/stable/10/sys/vm/swap_pager.c?annotate=320557#l2156 stable/11: https://svnweb.freebsd.org/base/stable/11/sys/vm/swap_pager.c?annotate=329591#l2126 My questions: how does one squelch this warning message on such systems running stable/11? If it involves setting the tunable to a more useful value, how does one reliably calculate that value? Thank you. -- | Jeremy Chadwick jdc at koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Making life hard for others since 1977. PGP 4BD6C0CB |
David Wolfskill
2018-Mar-02 11:49 UTC
total configured swap pages exceeds maximum recommended amount
[Recipient list trimmed, as this response addresses a peripheral consern -- dhw] On Fri, Mar 02, 2018 at 12:23:34AM -0800, Jeremy Chadwick wrote:> ... > The reason this box has 32GB swap (4x more than existing RAM) has to do > with planning ahead. The system can support up to 32GB RAM, but does > not have all the DIMM slots populated at this time. Swap on this > machine is a physical partition on its main disk, thus "shrinking swap" > is not not possible without a full format/reinstall. > .....Actually, now that you have sized the partitions. you could use "gpart resize" to shrink the (effective) swap partition, leaving a "hole" (of unused diske space) -- for now. Later, you could use "gpart resize" again to reclaim (some of) the unused space for your swap partition, should you want to do so. Peace, david -- David H. Wolfskill david at catwhisker.org Yes, the indictments don't "prove" guilt; that's what trials are for. See http://www.catwhisker.org/~david/publickey.gpg for my public key. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 618 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20180302/351987f1/attachment.sig>