Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2023 21:00:04 -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:  <FA8FFA68-AB62-4B13-AF20-13284DA04416@yahoo.com>
In-Reply-To: <202302260402.31Q41xdI097098@donotpassgo.dyslexicfish.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 25, 2023, at 20:01, Jamie Landeg-Jones <jamie@catflap.org> wrote:

> 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?

In:

=
https://lists.freebsd.org/archives/freebsd-current/2023-January/003086.htm=
l

I wrote text between the places the places that you quote:

"warning: increase kern.maxswzone or reduce amount of swap."

and:

"As I understand, the 2097152 pages vs. 916632 pages example means"

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".

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.

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.

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.)

=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?FA8FFA68-AB62-4B13-AF20-13284DA04416>