X Tutup
Skip to content

Commit 69c0807

Browse files
authored
Merge pull request systemd#15206 from anitazha/systoomd-v0
systemd-oomd
2 parents 4aa2f53 + c199dd3 commit 69c0807

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3421
-11
lines changed

docs/TRANSIENT-SETTINGS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ All cgroup/resource control settings are available for transient units
270270
✓ IPAccounting=
271271
✓ IPAddressAllow=
272272
✓ IPAddressDeny=
273+
✓ ManagedOOMSwap=
274+
✓ ManagedOOMMemoryPressure=
275+
✓ ManagedOOMMemoryPressureLimitPercent=
273276
```
274277

275278
## Process Killing Settings

man/oomctl.xml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+ -->
5+
6+
<refentry id="oomctl" conditional='ENABLE_OOMD'
7+
xmlns:xi="http://www.w3.org/2001/XInclude">
8+
9+
<refentryinfo>
10+
<title>oomctl</title>
11+
<productname>systemd</productname>
12+
</refentryinfo>
13+
14+
<refmeta>
15+
<refentrytitle>oomctl</refentrytitle>
16+
<manvolnum>1</manvolnum>
17+
</refmeta>
18+
19+
<refnamediv>
20+
<refname>oomctl</refname>
21+
<refpurpose>Analyze the state stored in <command>systemd-oomd</command></refpurpose>
22+
</refnamediv>
23+
24+
<refsynopsisdiv>
25+
<cmdsynopsis>
26+
<command>oomctl</command>
27+
<arg choice="opt" rep="repeat">OPTIONS</arg>
28+
<arg choice="req">COMMAND</arg>
29+
</cmdsynopsis>
30+
</refsynopsisdiv>
31+
32+
<refsect1>
33+
<title>Description</title>
34+
35+
<para><command>oomctl</command> may be used to get information about the various contexts read in by
36+
the <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> userspace
37+
out-of-memory (OOM) killer,
38+
<citerefentry><refentrytitle>systemd-oomd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
39+
40+
</refsect1>
41+
42+
<refsect1>
43+
<title>Commands</title>
44+
45+
<para>The following commands are understood:</para>
46+
47+
<variablelist>
48+
<varlistentry>
49+
<term><command>dump</command></term>
50+
51+
<listitem><para>Show the current state of the cgroup(s) and system context(s) stored by
52+
<command>systemd-oomd</command>.</para></listitem>
53+
</varlistentry>
54+
55+
</variablelist>
56+
57+
</refsect1>
58+
59+
<refsect1>
60+
<title>Options</title>
61+
62+
<para>The following options are understood:</para>
63+
64+
<variablelist>
65+
<xi:include href="standard-options.xml" xpointer="help" />
66+
<xi:include href="standard-options.xml" xpointer="version" />
67+
<xi:include href="standard-options.xml" xpointer="no-pager" />
68+
</variablelist>
69+
</refsect1>
70+
71+
<refsect1>
72+
<title>Exit status</title>
73+
74+
<para>On success, 0 is returned, a non-zero failure code otherwise.</para>
75+
</refsect1>
76+
77+
<refsect1>
78+
<title>See Also</title>
79+
<para>
80+
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
81+
<citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
82+
<citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
83+
</para>
84+
</refsect1>
85+
86+
</refentry>

man/oomd.conf.xml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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+ -->
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>SwapUsedLimitPercent=</varname></term>
52+
53+
<listitem><para>Sets the limit for swap usage on the system before <command>systemd-oomd</command> will
54+
take action. If the percentage of swap used on the system is more than what is defined here,
55+
<command>systemd-oomd</command> will act on eligible descendant cgroups, starting from the ones with the
56+
highest swap usage to the lowest swap usage. Which cgroups are monitored and what
57+
action gets taken depends on what the unit has configured for <varname>ManagedOOMSwap=</varname>.
58+
Takes a percentage value between 0% and 100%, inclusive. Defaults to 90%.</para></listitem>
59+
</varlistentry>
60+
61+
<varlistentry>
62+
<term><varname>DefaultMemoryPressureLimitPercent=</varname></term>
63+
64+
<listitem><para>Sets the limit for memory pressure on the unit's cgroup before <command>systemd-oomd</command>
65+
will take action. A unit can override this value with <varname>ManagedOOMMemoryPressureLimitPercent=</varname>.
66+
The memory pressure for this property represents the fraction of time in a 10 second window in which all tasks
67+
in the cgroup were delayed. For each monitored cgroup, if the memory pressure on that cgroup exceeds the
68+
limit set for more than 30 seconds, <command>systemd-oomd</command> will act on eligible descendant cgroups,
69+
starting from the ones with the most reclaim activity to the least reclaim activity. Which cgroups are
70+
monitored and what action gets taken depends on what the unit has configured for
71+
<varname>ManagedOOMMemoryPressure=</varname>. Takes a percentage value between 0% and 100%, inclusive.
72+
Defaults to 60%.</para></listitem>
73+
</varlistentry>
74+
75+
</variablelist>
76+
</refsect1>
77+
78+
<refsect1>
79+
<title>See Also</title>
80+
<para>
81+
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
82+
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
83+
<citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
84+
<citerefentry><refentrytitle>oomctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
85+
</para>
86+
</refsect1>
87+
88+
</refentry>

0 commit comments

Comments
 (0)
X Tutup