Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 2021 10:08:37 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Alan Somers <asomers@freebsd.org>
Cc:        Olivier Certner <olivier.freebsd@free.fr>, Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: The out-of-swap killer makes poor choices
Message-ID:  <96B17A3F-4663-42E2-9D29-C022803C9864@yahoo.com>
In-Reply-To: <CAOtMX2iYr4NDYE0xHSa_w1hA5XQ2m9cA28NzPoGbfzAKKox9aQ@mail.gmail.com>
References:  <CAOtMX2jYmrK7ftx62_NEfNCWS7O=giHKL1p9kXCqq1t5E1arxA@mail.gmail.com> <CAOtMX2i3Njo=KBP=99_G0%2BKuSa00CVgNvacmzhTaoZUYEhwPPA@mail.gmail.com> <YDYyQ1V/hEAGV%2ByJ@kib.kiev.ua> <1984125.0OzZcVfBr4@ravel> <CAOtMX2iYr4NDYE0xHSa_w1hA5XQ2m9cA28NzPoGbfzAKKox9aQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2021-Feb-24, at 09:34, Alan Somers <asomers at freebsd.org> wrote:

>> . . .
>=20
> There's another silly problem that I didn't mention in my original =
post.
> The old rule of thumb is that the swap partition's size should be =
twice as
> large as the amount of RAM.  However, that's no longer possible in =
many
> cases.  The kernel imposes a hard limit of 64 GiB (on amd64 at least) =
on
> the usable size of any swap partition, and many servers now have far =
more
> than 64 GiB of RAM.  So the advice needs to change with the times.  I =
don't
> know what the best size would be for a modern server, but I would =
guess
> that it must be at least several times the RSS of your largest =
process, and
> also at least one tenth of RAM (for use as a dump device with =
compressed
> core dumps).

That was fixed in main at least:

# swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/gpt/FBSDFHUGEswap 201326592        0 201326592     0%

That is from a system based on main 3acea07c1873 :

# ~/fbsd-based-on-what-freebsd-main.sh=20
merge-base: 3acea07c1873b1e4042f4a4fa8668745ee59f15b
merge-base: CommitDate: 2021-02-08 19:15:21 +0000
c1845d00f818 (HEAD -> mm-src) mm-src snapshot for mm's patched build in =
git context.
3acea07c1873 (pure-src) Restore the augmented strlen commentary
FreeBSD FBSDFHUGE 14.0-CURRENT FreeBSD 14.0-CURRENT =
mm-src-n244686-c1845d00f818 GENERIC-NODBG  amd64 amd64 1400004 1400004

But the change is older than that.

There was a period where I had three 64 GiByte swap
partitions instead of one 192 GiByte swap partition,
because each was forcibly limited in size but the
total was not (on the scale involved in the example
context).

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96B17A3F-4663-42E2-9D29-C022803C9864>