Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2022 14:21:25 +1100
From:      Peter Jeremy <peterj@freebsd.org>
To:        ralph41096 <ralph41096@protonmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Out-of-swap killer and SIGTERM signal
Message-ID:  <Yd5JNQyokaVrX6zb@server.rulingia.com>
In-Reply-To: <ulzJKQSiG37ZtJR9pE-IasT-K1hqpq__htA_JbNJkDkVLD4MeGtXg59rltE6VhKB74U8ztlapijvd6i62-QJ_CVDrOdWubywhbWznmwVa1U=@protonmail.com>
References:  <ulzJKQSiG37ZtJR9pE-IasT-K1hqpq__htA_JbNJkDkVLD4MeGtXg59rltE6VhKB74U8ztlapijvd6i62-QJ_CVDrOdWubywhbWznmwVa1U=@protonmail.com>

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

--YQZS0K7jK4RUas+L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2022-Jan-10 12:55:56 +0000, ralph41096 <ralph41096@protonmail.com> wrote:
>Do you think it would be a good idea to introduce the following soft
>mode for the Out-of-swap killer?

There have been lots of discussions about this in the past, starting in
about 1998, (though I agree that it's been about 4 years since the last
discussion).  I suggest you search for "freebsd+sigdanger" for previous
discussions.

>New behaviour:
>  1) If there is less than 2 GiB of free swap space, send SIGTERM
>     signals to the condemned processes, then wait for a 5 seconds
>     grace period, then send SIGKILL signals to the condemned processes
>     who are still running.

2 GiB seems quite a high limit, especially with a 5s grace period.  That
implies the system is using swap at 410 MiB/s - which seems unrealistic.
It also means that you need to overprovision swap by 2 GiB since the last
2 GiB is effectively unusable.

>These two system-wide parameters (2 GiB of free swap space, 5 seconds
>grace period) could be defined in a configuration file, to allow the
>administrator to change them.

The FreeBSD model would be to make them sysctls.

--=20
Peter Jeremy

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

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

iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmHeSTBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF
QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi
CzSPkw//V6FrV9st3G2djUBqxbDAccdq3wJNZXdfLerDsMhpBQB693SUoDPszEsE
NDQTTDKl9pT6HMaZlyO70gIRQE/KIouxAr3u+N9bvPm9Fh/kg2z+r/15HhGV2mTy
Pjik+4WaXmqaBA7PaWvRNc2U7b6mS32jlO9Z/qpHLU3nBbIf+0MU+XhN1hrDO8sm
qoTqVFNudPkhNHvjcwKphhHCvKAuyqE0LaRYhUZCv+ARiQrs2TaZKwOkFeyY48yM
Ei1i4LQt8XZ/VJ38gXvh2pj8nILQut7hw8Wofo4T3PZnaSNKXqx/vS19CL33gZrq
geX4lr5aHKV5J966gpbgM8/suz8Y6cwgaRCqRNGMfUsf3M9xdg0CeTA4ZzW9NEXz
qrdBEPXfUT+RfR6Q+SBmeWP4nL/luHDRx6M09GJerYd8hGF2igacf5ZJfdHY7VO/
iHSSK0qaV6moYlyaXb1IYjwIBFSw2qDTWlO8lu1p8qbk0ycTxrQIiWEyTvom41+P
2f5jeEegDJrKRWUqnOBMQJbUW6bmjny2Dl2nAYvgSsd0keB0Pw5RgJaTO81CN5Pf
DfGlMEvivX2tdI0kRPaoLKFSWnSwxDiAibfT3RQVBrW9XJgzmePK6Gspb7IXbPYE
x2m+GbXbDtIDdgYSvoU0KAJKiU9wGR+utr+UVrkzapPA3jlX5HY=
=CN8Y
-----END PGP SIGNATURE-----

--YQZS0K7jK4RUas+L--



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