]>
Commit | Line | Data |
---|---|---|
cf3e5788 AZ |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | |
eea10b26 | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
db9ecf05 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
cf3e5788 AZ |
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> | |
73e97bb0 ZJS |
25 | <para><simplelist> |
26 | <member><filename>/etc/systemd/oomd.conf</filename></member> | |
b83a59f8 ZJS |
27 | <member><filename>/run/systemd/oomd.conf</filename></member> |
28 | <member><filename>/usr/lib/systemd/oomd.conf</filename></member> | |
73e97bb0 | 29 | <member><filename>/etc/systemd/oomd.conf.d/*.conf</filename></member> |
b83a59f8 | 30 | <member><filename>/run/systemd/oomd.conf.d/*.conf</filename></member> |
73e97bb0 ZJS |
31 | <member><filename>/usr/lib/systemd/oomd.conf.d/*.conf</filename></member> |
32 | </simplelist></para> | |
cf3e5788 AZ |
33 | </refsynopsisdiv> |
34 | ||
35 | <refsect1> | |
36 | <title>Description</title> | |
37 | ||
38 | <para>These files configure the various parameters of the | |
39 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> userspace | |
40 | out-of-memory (OOM) killer, | |
41 | <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
42 | See <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
43 | for a general description of the syntax.</para> | |
44 | ||
45 | </refsect1> | |
46 | ||
47 | <xi:include href="standard-conf.xml" xpointer="main-conf" /> | |
48 | ||
49 | <refsect1> | |
50 | <title>[OOM] Section Options</title> | |
51 | ||
52 | <para>The following options are available in the [OOM] section:</para> | |
53 | ||
54 | <variablelist class='config-directives'> | |
55 | <varlistentry> | |
d06e7fb5 LP |
56 | <term><varname>SwapUsedLimit=</varname></term> |
57 | ||
cb5ce676 AZ |
58 | <listitem><para>Sets the limit for memory and swap usage on the system before <command>systemd-oomd</command> |
59 | will take action. If the fraction of memory used and the fraction of swap used on the system are both more than | |
60 | what is defined here, <command>systemd-oomd</command> will act on eligible descendant control groups with swap | |
61 | usage greater than 5% of total swap, starting from the ones with the highest swap usage. Which | |
685b0985 | 62 | control groups are monitored and what action gets taken depends on what the unit has configured for |
d06e7fb5 | 63 | <varname>ManagedOOMSwap=</varname>. Takes a value specified in percent (when suffixed with "%"), |
ec07c3c8 AK |
64 | permille ("‰") or permyriad ("‱"), between 0% and 100%, inclusive. Defaults to 90%.</para> |
65 | ||
aefdc112 | 66 | <xi:include href="version-info.xml" xpointer="v247"/></listitem> |
cf3e5788 AZ |
67 | </varlistentry> |
68 | ||
69 | <varlistentry> | |
0a9f9344 | 70 | <term><varname>DefaultMemoryPressureLimit=</varname></term> |
cf3e5788 | 71 | |
d06e7fb5 LP |
72 | <listitem><para>Sets the limit for memory pressure on the unit's control group before |
73 | <command>systemd-oomd</command> will take action. A unit can override this value with | |
74 | <varname>ManagedOOMMemoryPressureLimit=</varname>. The memory pressure for this property represents | |
75 | the fraction of time in a 10 second window in which all tasks in the control group were delayed. For | |
76 | each monitored control group, if the memory pressure on that control group exceeds the limit set for | |
77 | longer than the duration set by <varname>DefaultMemoryPressureDurationSec=</varname>, | |
78 | <command>systemd-oomd</command> will act on eligible descendant control groups, starting from the | |
79 | ones with the most reclaim activity to the least reclaim activity. Which control groups are monitored | |
80 | and what action gets taken depends on what the unit has configured for | |
81 | <varname>ManagedOOMMemoryPressure=</varname>. Takes a fraction specified in the same way as | |
ec07c3c8 AK |
82 | <varname>SwapUsedLimit=</varname> above. Defaults to 60%.</para> |
83 | ||
aefdc112 | 84 | <xi:include href="version-info.xml" xpointer="v247"/></listitem> |
cf3e5788 AZ |
85 | </varlistentry> |
86 | ||
c20aa7b1 AZ |
87 | <varlistentry> |
88 | <term><varname>DefaultMemoryPressureDurationSec=</varname></term> | |
89 | ||
d06e7fb5 LP |
90 | <listitem><para>Sets the amount of time a unit's control group needs to have exceeded memory pressure |
91 | limits before <command>systemd-oomd</command> will take action. Memory pressure limits are defined by | |
0a9f9344 | 92 | <varname>DefaultMemoryPressureLimit=</varname> and <varname>ManagedOOMMemoryPressureLimit=</varname>. |
ec07c3c8 AK |
93 | Must be set to 0, or at least 1 second. Defaults to 30 seconds when unset or 0.</para> |
94 | ||
95 | <xi:include href="version-info.xml" xpointer="v248"/></listitem> | |
c20aa7b1 AZ |
96 | </varlistentry> |
97 | ||
cf3e5788 AZ |
98 | </variablelist> |
99 | </refsect1> | |
100 | ||
101 | <refsect1> | |
102 | <title>See Also</title> | |
13a69c12 DT |
103 | <para><simplelist type="inline"> |
104 | <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
105 | <member><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> | |
106 | <member><citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> | |
107 | <member><citerefentry><refentrytitle>oomctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
108 | </simplelist></para> | |
cf3e5788 AZ |
109 | </refsect1> |
110 | ||
111 | </refentry> |