summaryrefslogtreecommitdiff
path: root/man/systemd.unit.xml
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-11-17 10:00:12 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-01 09:53:18 +0100
commit81513b382b24a7f3602987f71042d075ca27d1a5 (patch)
treef5e91164c685134f8ecaf7b175365b1b97a8c70f /man/systemd.unit.xml
parent99f8a6d7f58c9edb00b3d214b685987444dc3931 (diff)
downloadsystemd-81513b382b24a7f3602987f71042d075ca27d1a5.tar.gz
core: add Condition[Memory/CPU/IO]Pressure
By default checks PSI on /proc/pressure, and causes a unit to be skipped if the threshold is above the given configuration for the avg300 measurement. Also allow to pass a custom timespan, and a particular slice unit to check under. Fixes #20139
Diffstat (limited to 'man/systemd.unit.xml')
-rw-r--r--man/systemd.unit.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index dbf56c26a5..2a44b8cfd8 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -1659,6 +1659,29 @@
</varlistentry>
<varlistentry>
+ <term><varname>ConditionMemoryPressure=</varname></term>
+ <term><varname>ConditionCPUPressure=</varname></term>
+ <term><varname>ConditionIOPressure=</varname></term>
+
+ <listitem><para>Verify that the overall system (memory, CPU or IO) pressure is below or equal to a threshold.
+ This setting takes a threshold value as argument. It can be specified as a simple percentage value,
+ suffixed with <literal>%</literal>, in which case the pressure will be measured as an average over the last
+ five minutes before the attempt to start the unit is performed.
+ Alternatively, the average timespan can also be specified using <literal>/</literal> as a separator, for
+ example: <literal>10%/1min</literal>. The supported timespans match what the kernel provides, and are
+ limited to <literal>10sec</literal>, <literal>1min</literal> and <literal>5min</literal>. The
+ <literal>full</literal> PSI will be checked first, and if not found <literal>some</literal> will be
+ checked. For more details, see the documentation on <ulink
+ url="https://www.kernel.org/doc/html/latest/accounting/psi.html">PSI (Pressure Stall Information)
+ </ulink>.</para>
+
+ <para>Optionally, the threshold value can be prefixed with the slice unit under which the pressure will be checked,
+ followed by a <literal>:</literal>. If the slice unit is not specified, the overall system pressure will be measured,
+ instead of a particular cgroup's.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>AssertArchitecture=</varname></term>
<term><varname>AssertVirtualization=</varname></term>
<term><varname>AssertHost=</varname></term>
@@ -1686,6 +1709,9 @@
<term><varname>AssertMemory=</varname></term>
<term><varname>AssertCPUs=</varname></term>
<term><varname>AssertOSRelease=</varname></term>
+ <term><varname>AssertMemoryPressure=</varname></term>
+ <term><varname>AssertCPUPressure=</varname></term>
+ <term><varname>AssertIOPressure=</varname></term>
<listitem><para>Similar to the <varname>ConditionArchitecture=</varname>,
<varname>ConditionVirtualization=</varname>, …, condition settings described above, these settings