[systemd-devel] how to let systemd hibernate start/stop the swap area?
Lennart Poettering
lennart at poettering.net
Fri Mar 31 10:50:48 UTC 2023
On Do, 30.03.23 13:16, Phillip Susi (phill at thesusis.net) wrote:
>
> Lennart Poettering <lennart at poettering.net> writes:
>
> > oomd/PSI looks at memory allocation latencies to determine memory
> > pressure. Since you disallow anonymous memory to be paged out and thus
> > increase IO on file backed memory you increase the latencies
> > unnecessarily, thus making oomd trigger earlier.
>
> Did this get changed in the last few years? Because I'm sure it used to
> be based on the total commit limit, and so OOM wouldn't start killing
> until your swap was full, which didn't happen until the system was
> thrashing itself to uselessness for 20 minutes already.
oomd becomes active on two distinct triggers:
This one:
https://github.com/systemd/systemd/blob/main/src/oom/oomd-manager.c#L383
and this one:
https://github.com/systemd/systemd/blob/main/src/oom/oomd-manager.c#L486
The latter is PSI.
> What happens if you use zswap? Will hibernation try to save things to
> there instead of a real disk swap? It might be nice to have zswap for
> normal use and the on disk swap for hibernate.
our sleep code does not consider zram devices for hibernation.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list