2020-09-09 11:04:36 +03:00
<?xml version='1.0'?> <!-- * - nxml - * -->
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
2023-12-25 17:48:33 +03:00
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
2020-11-09 07:23:58 +03:00
<!-- SPDX - License - Identifier: LGPL - 2.1 - or - later -->
2020-09-09 11:04:36 +03:00
<refentry id= "oomd.conf" conditional= 'ENABLE_OOMD'
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo >
<title > oomd.conf</title>
<productname > systemd</productname>
</refentryinfo>
<refmeta >
<refentrytitle > oomd.conf</refentrytitle>
<manvolnum > 5</manvolnum>
</refmeta>
<refnamediv >
<refname > oomd.conf</refname>
<refname > oomd.conf.d</refname>
<refpurpose > Global <command > systemd-oomd</command> configuration files</refpurpose>
</refnamediv>
<refsynopsisdiv >
2023-12-14 14:52:03 +03:00
<para > <simplelist >
<member > <filename > /etc/systemd/oomd.conf</filename> </member>
2024-02-22 12:58:48 +03:00
<member > <filename > /run/systemd/oomd.conf</filename> </member>
<member > <filename > /usr/lib/systemd/oomd.conf</filename> </member>
2023-12-14 14:52:03 +03:00
<member > <filename > /etc/systemd/oomd.conf.d/*.conf</filename> </member>
2024-02-22 12:58:48 +03:00
<member > <filename > /run/systemd/oomd.conf.d/*.conf</filename> </member>
2023-12-14 14:52:03 +03:00
<member > <filename > /usr/lib/systemd/oomd.conf.d/*.conf</filename> </member>
</simplelist> </para>
2020-09-09 11:04:36 +03:00
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para > These files configure the various parameters of the
<citerefentry > <refentrytitle > systemd</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> userspace
out-of-memory (OOM) killer,
<citerefentry > <refentrytitle > systemd-oomd.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry> .
See <citerefentry > <refentrytitle > systemd.syntax</refentrytitle> <manvolnum > 7</manvolnum> </citerefentry>
for a general description of the syntax.</para>
</refsect1>
<xi:include href= "standard-conf.xml" xpointer= "main-conf" />
<refsect1 >
<title > [OOM] Section Options</title>
<para > The following options are available in the [OOM] section:</para>
<variablelist class= 'config-directives' >
<varlistentry >
2021-02-17 19:56:26 +03:00
<term > <varname > SwapUsedLimit=</varname> </term>
2021-06-25 00:58:40 +03:00
<listitem > <para > Sets the limit for memory and swap usage on the system before <command > systemd-oomd</command>
will take action. If the fraction of memory used and the fraction of swap used on the system are both more than
what is defined here, <command > systemd-oomd</command> will act on eligible descendant control groups with swap
usage greater than 5% of total swap, starting from the ones with the highest swap usage. Which
2021-03-26 12:37:01 +03:00
control groups are monitored and what action gets taken depends on what the unit has configured for
2021-02-17 19:56:26 +03:00
<varname > ManagedOOMSwap=</varname> . Takes a value specified in percent (when suffixed with "%"),
2023-08-22 19:52:36 +03:00
permille ("‰") or permyriad ("‱"), between 0% and 100%, inclusive. Defaults to 90%.</para>
2023-09-18 18:03:38 +03:00
<xi:include href= "version-info.xml" xpointer= "v247" /> </listitem>
2020-09-09 11:04:36 +03:00
</varlistentry>
<varlistentry >
2021-02-03 01:16:03 +03:00
<term > <varname > DefaultMemoryPressureLimit=</varname> </term>
2020-09-09 11:04:36 +03:00
2021-02-17 19:56:26 +03:00
<listitem > <para > Sets the limit for memory pressure on the unit's control group before
<command > systemd-oomd</command> will take action. A unit can override this value with
<varname > ManagedOOMMemoryPressureLimit=</varname> . The memory pressure for this property represents
the fraction of time in a 10 second window in which all tasks in the control group were delayed. For
each monitored control group, if the memory pressure on that control group exceeds the limit set for
longer than the duration set by <varname > DefaultMemoryPressureDurationSec=</varname> ,
<command > systemd-oomd</command> will act on eligible descendant control groups, starting from the
ones with the most reclaim activity to the least reclaim activity. Which control groups are monitored
and what action gets taken depends on what the unit has configured for
<varname > ManagedOOMMemoryPressure=</varname> . Takes a fraction specified in the same way as
2023-08-22 19:52:36 +03:00
<varname > SwapUsedLimit=</varname> above. Defaults to 60%.</para>
2023-09-18 18:03:38 +03:00
<xi:include href= "version-info.xml" xpointer= "v247" /> </listitem>
2020-09-09 11:04:36 +03:00
</varlistentry>
2021-01-24 11:16:19 +03:00
<varlistentry >
<term > <varname > DefaultMemoryPressureDurationSec=</varname> </term>
2021-02-17 19:56:26 +03:00
<listitem > <para > Sets the amount of time a unit's control group needs to have exceeded memory pressure
limits before <command > systemd-oomd</command> will take action. Memory pressure limits are defined by
2021-02-03 01:16:03 +03:00
<varname > DefaultMemoryPressureLimit=</varname> and <varname > ManagedOOMMemoryPressureLimit=</varname> .
2023-08-22 19:52:36 +03:00
Must be set to 0, or at least 1 second. Defaults to 30 seconds when unset or 0.</para>
<xi:include href= "version-info.xml" xpointer= "v248" /> </listitem>
2021-01-24 11:16:19 +03:00
</varlistentry>
2020-09-09 11:04:36 +03:00
</variablelist>
</refsect1>
<refsect1 >
<title > See Also</title>
2023-12-22 21:09:32 +03:00
<para > <simplelist type= "inline" >
<member > <citerefentry > <refentrytitle > systemd</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemd.resource-control</refentrytitle> <manvolnum > 5</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > systemd-oomd.service</refentrytitle> <manvolnum > 8</manvolnum> </citerefentry> </member>
<member > <citerefentry > <refentrytitle > oomctl</refentrytitle> <manvolnum > 1</manvolnum> </citerefentry> </member>
</simplelist> </para>
2020-09-09 11:04:36 +03:00
</refsect1>
</refentry>