1<?xml version='1.0'?> <!--*-nxml-*--> 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> 5 6<refentry id="oomd.conf" conditional='ENABLE_OOMD' 7 xmlns:xi="http://www.w3.org/2001/XInclude"> 8 <refentryinfo> 9 <title>oomd.conf</title> 10 <productname>systemd</productname> 11 </refentryinfo> 12 13 <refmeta> 14 <refentrytitle>oomd.conf</refentrytitle> 15 <manvolnum>5</manvolnum> 16 </refmeta> 17 18 <refnamediv> 19 <refname>oomd.conf</refname> 20 <refname>oomd.conf.d</refname> 21 <refpurpose>Global <command>systemd-oomd</command> configuration files</refpurpose> 22 </refnamediv> 23 24 <refsynopsisdiv> 25 <para><filename>/etc/systemd/oomd.conf</filename></para> 26 <para><filename>/etc/systemd/oomd.conf.d/*.conf</filename></para> 27 <para><filename>/usr/lib/systemd/oomd.conf.d/*.conf</filename></para> 28 </refsynopsisdiv> 29 30 <refsect1> 31 <title>Description</title> 32 33 <para>These files configure the various parameters of the 34 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> userspace 35 out-of-memory (OOM) killer, 36 <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. 37 See <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry> 38 for a general description of the syntax.</para> 39 40 </refsect1> 41 42 <xi:include href="standard-conf.xml" xpointer="main-conf" /> 43 44 <refsect1> 45 <title>[OOM] Section Options</title> 46 47 <para>The following options are available in the [OOM] section:</para> 48 49 <variablelist class='config-directives'> 50 <varlistentry> 51 <term><varname>SwapUsedLimit=</varname></term> 52 53 <listitem><para>Sets the limit for memory and swap usage on the system before <command>systemd-oomd</command> 54 will take action. If the fraction of memory used and the fraction of swap used on the system are both more than 55 what is defined here, <command>systemd-oomd</command> will act on eligible descendant control groups with swap 56 usage greater than 5% of total swap, starting from the ones with the highest swap usage. Which 57 control groups are monitored and what action gets taken depends on what the unit has configured for 58 <varname>ManagedOOMSwap=</varname>. Takes a value specified in percent (when suffixed with "%"), 59 permille ("‰") or permyriad ("‱"), between 0% and 100%, inclusive. Defaults to 90%.</para></listitem> 60 </varlistentry> 61 62 <varlistentry> 63 <term><varname>DefaultMemoryPressureLimit=</varname></term> 64 65 <listitem><para>Sets the limit for memory pressure on the unit's control group before 66 <command>systemd-oomd</command> will take action. A unit can override this value with 67 <varname>ManagedOOMMemoryPressureLimit=</varname>. The memory pressure for this property represents 68 the fraction of time in a 10 second window in which all tasks in the control group were delayed. For 69 each monitored control group, if the memory pressure on that control group exceeds the limit set for 70 longer than the duration set by <varname>DefaultMemoryPressureDurationSec=</varname>, 71 <command>systemd-oomd</command> will act on eligible descendant control groups, starting from the 72 ones with the most reclaim activity to the least reclaim activity. Which control groups are monitored 73 and what action gets taken depends on what the unit has configured for 74 <varname>ManagedOOMMemoryPressure=</varname>. Takes a fraction specified in the same way as 75 <varname>SwapUsedLimit=</varname> above. Defaults to 60%.</para></listitem> 76 </varlistentry> 77 78 <varlistentry> 79 <term><varname>DefaultMemoryPressureDurationSec=</varname></term> 80 81 <listitem><para>Sets the amount of time a unit's control group needs to have exceeded memory pressure 82 limits before <command>systemd-oomd</command> will take action. Memory pressure limits are defined by 83 <varname>DefaultMemoryPressureLimit=</varname> and <varname>ManagedOOMMemoryPressureLimit=</varname>. 84 Must be set to 0, or at least 1 second. Defaults to 30 seconds when unset or 0.</para></listitem> 85 </varlistentry> 86 87 </variablelist> 88 </refsect1> 89 90 <refsect1> 91 <title>See Also</title> 92 <para> 93 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 94 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>, 95 <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, 96 <citerefentry><refentrytitle>oomctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> 97 </para> 98 </refsect1> 99 100</refentry> 101