Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Mar 2021 15:57:15 +0000
From:      tech-lists <tech-lists@zyxst.net>
To:        freebsd-hackers@freebsd.org
Subject:   Re: The out-of-swap killer makes poor choices
Message-ID:  <YD0O28EX/Xa2jc87@cloud.zyxst.net>
In-Reply-To: <CAOtMX2jYmrK7ftx62_NEfNCWS7O=giHKL1p9kXCqq1t5E1arxA@mail.gmail.com>
References:  <CAOtMX2jYmrK7ftx62_NEfNCWS7O=giHKL1p9kXCqq1t5E1arxA@mail.gmail.com>

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

--+XXFTLwu3tYB0Zsc
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Tue, Feb 23, 2021 at 01:49:49PM -0700, Alan Somers wrote:

[...lots...]

I've found that if I take a system already configured with swap, then
add say 2* 16GB swapfiles as per the handbook, enable the swapfiles,
that some things will use the swapfile and others not, even with plenty
available in the swapfiles.

example: 12-stable amd64 system running poudriere.

it will use the swap configured by default (think it's 2GB) as a
partition. In this example, all of swap is on ssd - the partition and
both swapfiles. Compiling some things like rust or firefox will use all
of the partition swap and some of the *swapfile* but not all of it[1]. It's
almost like some processes have more of an affinity for swap as a
partition than others, and others won't use swap as a swapfile at all.

In the end, because I don't know how to debug this kind of issue
further, it was easier to blat the ssd and install 32GB of swap on
reinstallation of the OS. Swapfiles arent used now, on this particular
install. The 32GB swap partition is fine and works as expected.

Thought the above might be of use as I dunno, a data point. I wonder,
though, why some programs have seemingly more affinity for swap-as-partitio=
n=20
than swap-as-swapfile.

[1] by "not all of it" I mean fail with an OOM message before all of the
swapfile is used
--=20
J.

--+XXFTLwu3tYB0Zsc
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE8n3tWhxW11Ccvv9/s8o7QhFzNAUFAmA9DtMACgkQs8o7QhFz
NAVRwQ/+NCbA+EtFkMItMaogDTua4YyDdB0F1DHEL2kVhi3vyzhDBtLFyZsdmcy0
RemNQEl5tGgrNO46vdoxr4oxlH8omCKY7Q5VHo+fYxPFNnJOeZRcf93YwupXcr92
LRFaYZBRs3C2M/WLs4HfuTQ7ip1h30IxaV+JuPBHe6F/4H/ndJ7KkhlJ4f4gJkZM
CTuqcX7VKI04zX21Q79pbTyTFviXilQXkpcOmFZRM8OMJS+7ovZ0n3X4JMbknHWp
Sd+CRkMBj4rvcxk1jMsGdWr2rzB4nP3jYKH2vv+Ing+kUQ4c9EQ7xs7KWrWErhWJ
7GBWe1qXY3u0Zm/KfRsuZ3dwqtd88zvFu7nCdZAjYaWGuJJHHDSMhpyF6JzH2Yej
mW0BGYAwVX6ULFDKMw3r86NUc9UPcyStBWJRgmzCRswgYwvkSP0Y9Kh6zhAQiS+A
lZVUAIYUO+EcCY0NZypOsO6Mvnuq0ACng6yk5q3UZRe20RNR8dTKelXgIQ1d58j1
O6naeB0o5fD/G4cfuFGPb4Jtvh1AgbgMWe4Fk9oLAz10RiXvUI/983dFotrWtrn0
gOUaVKBK83dGEfdgXWSnD0M9M4VstKdBGZ/hXAV+PzB3nc0ZX3xGmA4w9zOrFSdF
LPs+dsztLkweixXNHk0k7JCehSmv0+GUkKcbTq3ZI1tmPY3NM9w=
=pTbf
-----END PGP SIGNATURE-----

--+XXFTLwu3tYB0Zsc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YD0O28EX/Xa2jc87>