[systemd-devel] how to let systemd hibernate start/stop the swap area?

Barry barry at barrys-emacs.org
Fri Mar 31 06:37:20 UTC 2023



> On 31 Mar 2023, at 00:51, Michael Chapman <mike at very.puzzling.org> wrote:
> 
> On Fri, 31 Mar 2023, Phillip Susi wrote:
>> 
>> Michael Chapman <mike at very.puzzling.org> writes:
>> 
>>> What specifically is the difference between:
>>> 
>>> * swap does not exist at all;
>>> * swap is full of data that will not be swapped in for weeks or months;
>> 
>> That's the wrong question.
> 
> Nevertheless it was the question I was faced with. I had servers with a 
> huge amount of memory, a fair bit of swap, and ALL of that swap filled 
> with stuff that would need to be entirely swapped back in at some point at 
> a moments notice.
> 
> The solution was simple: turn off swap. Now there was no "swap everything 
> back in" penalty, and since there was plenty of RAM anyway the change had 
> little impact on the behaviour of the rest of the system.

If you want to run in ram only then you must turn off the kernel overcommit.
Have you done that? If not then you risk processes getting SEGV signals.

There is a lot of moving parts that affect the robustness of a big server.
Swap is one of them that is important to allow efficient use of all the
hardware resources.

I work on servers with 400G of ram, but it is all used. Swap is a critical part of tuning
the performance with the network heavy work load that disk I/O impacts.

Barry

> 



More information about the systemd-devel mailing list