| 1 |
'\" t |
| 2 |
.TH "OOMD\&.CONF" "5" "" "systemd 257.13" "oomd.conf" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
oomd.conf, oomd.conf.d \- Global \fBsystemd\-oomd\fR configuration files |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.PP |
| 26 |
.RS 4 |
| 27 |
/etc/systemd/oomd\&.conf |
| 28 |
.RE |
| 29 |
.RS 4 |
| 30 |
/run/systemd/oomd\&.conf |
| 31 |
.RE |
| 32 |
.RS 4 |
| 33 |
/usr/local/lib/systemd/oomd\&.conf |
| 34 |
.RE |
| 35 |
.RS 4 |
| 36 |
/usr/lib/systemd/oomd\&.conf |
| 37 |
.RE |
| 38 |
.RS 4 |
| 39 |
/etc/systemd/oomd\&.conf\&.d/*\&.conf |
| 40 |
.RE |
| 41 |
.RS 4 |
| 42 |
/run/systemd/oomd\&.conf\&.d/*\&.conf |
| 43 |
.RE |
| 44 |
.RS 4 |
| 45 |
/usr/local/lib/systemd/oomd\&.conf\&.d/*\&.conf |
| 46 |
.RE |
| 47 |
.RS 4 |
| 48 |
/usr/lib/systemd/oomd\&.conf\&.d/*\&.conf |
| 49 |
.RE |
| 50 |
.SH "DESCRIPTION" |
| 51 |
.PP |
| 52 |
These files configure the various parameters of the |
| 53 |
\fBsystemd\fR(1) |
| 54 |
userspace out\-of\-memory (OOM) killer, |
| 55 |
\fBsystemd-oomd.service\fR(8)\&. See |
| 56 |
\fBsystemd.syntax\fR(7) |
| 57 |
for a general description of the syntax\&. |
| 58 |
.SH "CONFIGURATION DIRECTORIES AND PRECEDENCE" |
| 59 |
.PP |
| 60 |
The default configuration is set during compilation, so configuration is only needed when it is necessary to deviate from those defaults\&. The main configuration file is loaded from one of the listed directories in order of priority, only the first file found is used: |
| 61 |
/etc/systemd/, |
| 62 |
/run/systemd/, |
| 63 |
/usr/local/lib/systemd/ |
| 64 |
\&\s-2\u[1]\d\s+2, |
| 65 |
/usr/lib/systemd/\&. The vendor version of the file contains commented out entries showing the defaults as a guide to the administrator\&. Local overrides can also be created by creating drop\-ins, as described below\&. The main configuration file can also be edited for this purpose (or a copy in |
| 66 |
/etc/ |
| 67 |
if it is shipped under |
| 68 |
/usr/), however using drop\-ins for local configuration is recommended over modifications to the main configuration file\&. |
| 69 |
.PP |
| 70 |
In addition to the main configuration file, drop\-in configuration snippets are read from |
| 71 |
/usr/lib/systemd/*\&.conf\&.d/, |
| 72 |
/usr/local/lib/systemd/*\&.conf\&.d/, and |
| 73 |
/etc/systemd/*\&.conf\&.d/\&. Those drop\-ins have higher precedence and override the main configuration file\&. Files in the |
| 74 |
*\&.conf\&.d/ |
| 75 |
configuration subdirectories are sorted by their filename in lexicographic order, regardless of in which of the subdirectories they reside\&. When multiple files specify the same option, for options which accept just a single value, the entry in the file sorted last takes precedence, and for options which accept a list of values, entries are collected as they occur in the sorted files\&. |
| 76 |
.PP |
| 77 |
When packages need to customize the configuration, they can install drop\-ins under |
| 78 |
/usr/\&. Files in |
| 79 |
/etc/ |
| 80 |
are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages\&. Drop\-ins have to be used to override package drop\-ins, since the main configuration file has lower precedence\&. It is recommended to prefix all filenames in those subdirectories with a two\-digit number and a dash, to simplify the ordering\&. This also defines a concept of drop\-in priorities to allow OS vendors to ship drop\-ins within a specific range lower than the range used by users\&. This should lower the risk of package drop\-ins overriding accidentally drop\-ins defined by users\&. It is recommended to use the range 10\-40 for drop\-ins in |
| 81 |
/usr/ |
| 82 |
and the range 60\-90 for drop\-ins in |
| 83 |
/etc/ |
| 84 |
and |
| 85 |
/run/, to make sure that local and transient drop\-ins take priority over drop\-ins shipped by the OS vendor\&. |
| 86 |
.PP |
| 87 |
To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to |
| 88 |
/dev/null |
| 89 |
in the configuration directory in |
| 90 |
/etc/, with the same filename as the vendor configuration file\&. |
| 91 |
.SH "[OOM] SECTION OPTIONS" |
| 92 |
.PP |
| 93 |
The following options are available in the [OOM] section: |
| 94 |
.PP |
| 95 |
\fISwapUsedLimit=\fR |
| 96 |
.RS 4 |
| 97 |
Sets the limit for memory and swap usage on the system before |
| 98 |
\fBsystemd\-oomd\fR |
| 99 |
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, |
| 100 |
\fBsystemd\-oomd\fR |
| 101 |
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 control groups are monitored and what action gets taken depends on what the unit has configured for |
| 102 |
\fIManagedOOMSwap=\fR\&. Takes a value specified in percent (when suffixed with "%"), permille ("‰") or permyriad ("‱"), between 0% and 100%, inclusive\&. Defaults to 90%\&. |
| 103 |
.sp |
| 104 |
Added in version 247\&. |
| 105 |
.RE |
| 106 |
.PP |
| 107 |
\fIDefaultMemoryPressureLimit=\fR |
| 108 |
.RS 4 |
| 109 |
Sets the limit for memory pressure on the unit\*(Aqs control group before |
| 110 |
\fBsystemd\-oomd\fR |
| 111 |
will take action\&. A unit can override this value with |
| 112 |
\fIManagedOOMMemoryPressureLimit=\fR\&. 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 |
| 113 |
\fIDefaultMemoryPressureDurationSec=\fR, |
| 114 |
\fBsystemd\-oomd\fR |
| 115 |
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 |
| 116 |
\fIManagedOOMMemoryPressure=\fR\&. Takes a fraction specified in the same way as |
| 117 |
\fISwapUsedLimit=\fR |
| 118 |
above\&. Defaults to 60%\&. |
| 119 |
.sp |
| 120 |
Added in version 247\&. |
| 121 |
.RE |
| 122 |
.PP |
| 123 |
\fIDefaultMemoryPressureDurationSec=\fR |
| 124 |
.RS 4 |
| 125 |
Sets the amount of time a unit\*(Aqs control group needs to have exceeded memory pressure limits before |
| 126 |
\fBsystemd\-oomd\fR |
| 127 |
will take action\&. A unit can override this value with |
| 128 |
\fIManagedOOMMemoryPressureDurationSec=\fR\&. Memory pressure limits are defined by |
| 129 |
\fIDefaultMemoryPressureLimit=\fR |
| 130 |
and |
| 131 |
\fIManagedOOMMemoryPressureLimit=\fR\&. Must be set to 0, or at least 1 second\&. Defaults to 30 seconds when unset or 0\&. |
| 132 |
.sp |
| 133 |
Added in version 248\&. |
| 134 |
.RE |
| 135 |
.SH "SEE ALSO" |
| 136 |
.PP |
| 137 |
\fBsystemd\fR(1), \fBsystemd.resource-control\fR(5), \fBsystemd-oomd.service\fR(8), \fBoomctl\fR(1) |
| 138 |
.SH "NOTES" |
| 139 |
.IP " 1." 4 |
| 140 |
💣💥🧨💥💥💣 Please note that those configuration files must be available at all times. If |
| 141 |
/usr/local/ |
| 142 |
is a separate partition, it may not be available during early boot, and must not be used for configuration. |
| 143 |
|