[systemd-devel] how to let systemd hibernate start/stop the swap area?
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Mar 31 13:51:25 UTC 2023
On Fri, 2023-03-31 at 12:50 +0200, Lennart Poettering wrote:
> 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.
We ended up having to disable systemd-oomd on our autobuilder/CI
systems since it got upset when a single process tree was using the
majority of the system resources (from memory greater than 90%?).
On a CI system, we'd expect the majority of the system resources to be
used by that single user/process tree so this was a bit annoying and we
ended up disabling it. Everything was fine since so it was a false
positive.
I'm having trouble mapping that behaviour to the above two triggers...
Cheers,
Richard
More information about the systemd-devel
mailing list