diff options
author | Ryan Wilson <ryantimwilson@meta.com> | 2024-10-15 05:49:54 +0200 |
---|---|---|
committer | Ryan Wilson <ryantimwilson@meta.com> | 2024-10-17 05:12:38 +0200 |
commit | 63d4c4271ca529f8357a84cbc075170fffdb3de8 (patch) | |
tree | e8a1c9c0dfe0bd0ecc76daabaa7b8352747952b1 /man/systemd.resource-control.xml | |
parent | oomd: Refactor DefaultMemoryPressureDurationSec= to use conf parser (diff) | |
download | systemd-63d4c4271ca529f8357a84cbc075170fffdb3de8.tar.xz systemd-63d4c4271ca529f8357a84cbc075170fffdb3de8.zip |
cgroup: Add ManagedOOMMemoryPressureDurationSec= override setting for units
This will allow units (scopes/slices/services) to override the default
systemd-oomd setting DefaultMemoryPressureDurationSec=.
The semantics of ManagedOOMMemoryPressureDurationSec= are:
- If >= 1 second, overrides DefaultMemoryPressureDurationSec= from oomd.conf
- If is empty, uses DefaultMemoryPressureDurationSec= from oomd.conf
- Ignored if ManagedOOMMemoryPressure= is not "kill"
- Disallowed if < 1 second
Note the corresponding dbus property is DefaultMemoryPressureDurationUSec
which is in microseconds. This is consistent with other time-based
dbus properties.
Diffstat (limited to 'man/systemd.resource-control.xml')
-rw-r--r-- | man/systemd.resource-control.xml | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml index 2ffc279a35..1f16052a33 100644 --- a/man/systemd.resource-control.xml +++ b/man/systemd.resource-control.xml @@ -1535,10 +1535,10 @@ DeviceAllow=/dev/loop-control <listitem> <para>Overrides the default memory pressure limit set by <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for - this unit (cgroup). Takes a percentage value between 0% and 100%, inclusive. This property is - ignored unless <varname>ManagedOOMMemoryPressure=</varname><option>kill</option>. Defaults to 0%, + the cgroup of this unit. Takes a percentage value between 0% and 100%, inclusive. Defaults to 0%, which means to use the default set by <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. + This property is ignored unless <varname>ManagedOOMMemoryPressure=</varname><option>kill</option>. </para> <xi:include href="version-info.xml" xpointer="v247"/> @@ -1546,6 +1546,25 @@ DeviceAllow=/dev/loop-control </varlistentry> <varlistentry> + <term><varname>ManagedOOMMemoryPressureDurationSec=</varname></term> + + <listitem> + <para>Overrides the default memory pressure duration set by + <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for + the cgroup of this unit. The specified value supports a time unit such as <literal>ms</literal> or + <literal>μs</literal>, see + <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry> + for details on the permitted syntax. Must be set to either empty or a value of at least 1s. Defaults + to empty, which means to use the default set by + <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. + This property is ignored unless <varname>ManagedOOMMemoryPressure=</varname><option>kill</option>. + </para> + + <xi:include href="version-info.xml" xpointer="v257"/> + </listitem> + </varlistentry> + + <varlistentry> <term><varname>ManagedOOMPreference=none|avoid|omit</varname></term> <listitem> |