[systemd-devel] how to let systemd hibernate start/stop the swap area?
Michael Chapman
mike at very.puzzling.org
Thu Mar 30 20:57:49 UTC 2023
On Fri, 31 Mar 2023, Luca Boccassi wrote:
[...]
> No, it does not make "little difference", there are entire subsystems
> which are much worse off, if not completely useless, without swap.
> Post-cgroupsv2 memory controller things are considerably different on
> this front, and old "common wisdom" no longer applies.
What are some examples here?
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;
?
Either way, nothing more can be swapped out, and nothing will get swapped
in.
If everything fits in RAM, as far as I can see the only thing allowing
"non-guest processes" to be swapped out is that I'd get slightly more
available RAM for buffers and cache. But as I noted in the other thread,
I've already got enough of that!
So what advantage would there be to me to enable swap? I started off this
thread with a disadvantage, so there would have to be a *big* advantage to
counter that.
I am well aware that "you should always have swap" is good general advice
for most users. But it's important to remember there are exceptions to it!
Lennart suggested one such situation is where you're running everything
off RAM anyway. I suggest another such situation is where you have
sufficient RAM that your entire workload comfortably fits within it.
More information about the systemd-devel
mailing list