Date: Sat, 25 Feb 2023 21:20:24 -0800 From: Mark Millard <marklmi@yahoo.com> To: Jamie Landeg-Jones <jamie@catflap.org> Cc: phk@phk.freebsd.dk, "freebsd-current@freebsd.org" <freebsd-current@FreeBSD.org> Subject: Re: An idea for swap partition size vs. swap space size in use handling Message-ID: <98459520-A9A0-430F-B32C-AE2FB30C12E8@yahoo.com> In-Reply-To: <FA8FFA68-AB62-4B13-AF20-13284DA04416@yahoo.com> References: <E187AA6B-6832-4A75-81BC-21E0A999154D.ref@yahoo.com> <E187AA6B-6832-4A75-81BC-21E0A999154D@yahoo.com> <202301220717.30M7H7wC022099@critter.freebsd.dk> <6F24FD22-ED7B-44E2-B6A6-C82F845C3A56@yahoo.com> <202302260402.31Q41xdI097098@donotpassgo.dyslexicfish.net> <FA8FFA68-AB62-4B13-AF20-13284DA04416@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 25, 2023, at 21:00, Mark Millard <marklmi@yahoo.com> wrote: > On Feb 25, 2023, at 20:01, Jamie Landeg-Jones <jamie@catflap.org> = wrote: >=20 >> Mark Millard <marklmi@yahoo.com> wrote: >>=20 >>> On Jan 21, 2023, at 23:17, Poul-Henning Kamp <phk@phk.freebsd.dk> = wrote: >>>>=20 >>>> Last I looked at that code, that is precisely what happens >>>> if you add a too big swap-device ? >>>=20 >>> It produces a notice reporting how much bigger what it is >>> using is than what is recommended, if I understand the >>> message right. Here is an example were the difference was >>> small for an armv7 context: >>>=20 >>> warning: total configured swap (1003519 pages) exceeds maximum = recommended amount (1003072 pages). >>>=20 >>> Another from a context with a much bigger difference: >>>=20 >>> warning: total configured swap (2097152 pages) exceeds maximum = recommended amount (916632 pages). >>>=20 >>> These sort of messages are followed by: >>>=20 >>> warning: increase kern.maxswzone or reduce amount of swap. >>=20 >> I thought the same as phk. And I always thought those messages were >> just informational warnings on what to do to stop that excess swap >> space being unused and effectively wasted (i.e. suggestions to change >> settings, or reduce the swap size!), but you say this isn't correct: >>=20 >>> As I understand, the 2097152 pages vs. 916632 pages example means >>> that it was operating with the referenced fragmentation problems >>> being more likely. That would not be true if it was just using >>> more like the 916632 pages and ignoring the rest. >>=20 >> Are you, phk, or anyone else, able to provide further pointers or >> clarification on this? >=20 > In: >=20 > = https://lists.freebsd.org/archives/freebsd-current/2023-January/003086.htm= l >=20 > I wrote text between the places the places that you quote: >=20 > "warning: increase kern.maxswzone or reduce amount of swap." >=20 > and: >=20 > "As I understand, the 2097152 pages vs. 916632 pages example means" >=20 > that included quotes from man 8 loader, specifically its > kern.maxswzone material, that indicated there are resource > tradeoffs in adjusting kern.maxswzone and also indicated that > "care should be taken to not configure more swap than approximately > half of the theoretical maximum". It also says that kern.maxswzone > "directly governs the maximum amount of swap the system can support". >=20 > I'll also note that adjusting kern.maxswzone does not, of itself, > notably change the amount of swap that would be put to use for the > same workload. >=20 > So a message reporting to either adjust kern.maxswzone or > reduce the amount of swap is not documented to just be about > avoiding unused swap space, so long as the system does not > reach the "unrecoverable state" that was referenced in the > same quoted material. >=20 > If what I quoted is insufficient evidence for you, I'm not > likely to find other evidence that would be sufficient > for you. (Not that I've ever found other material about > the issue.) One adjustment: I forgot that these days the material that I originally quoted has moved around and where to find it depends on the vintage of FreeBSD in question. For 13.1-RELEASE: = https://man.freebsd.org/cgi/man.cgi?query=3Dloader&apropos=3D0&sektion=3D8= &manpath=3DFreeBSD+13.1-RELEASE&arch=3Ddefault&format=3Dhtml shows it in man 8 loader . (Similarly for older.) But for 13.2-STABLE: = https://man.freebsd.org/cgi/man.cgi?query=3Dloader_simp&apropos=3D0&sektio= n=3D8&manpath=3DFreeBSD+13.2-STABLE&arch=3Ddefault&format=3Dhtml shows it in man 8 loader_simp . (Similarly for 14.0-CURRENT.) =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98459520-A9A0-430F-B32C-AE2FB30C12E8>