]>
Commit | Line | Data |
---|---|---|
3802a3d3 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
d868475a | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
d868475a ZJS |
4 | |
5 | <!-- | |
b975b0d5 | 6 | This file is part of systemd. |
d868475a | 7 | |
b975b0d5 | 8 | Copyright 2013 Zbigniew Jędrzejewski-Szmek |
d868475a | 9 | |
b975b0d5 ZJS |
10 | systemd is free software; you can redistribute it and/or modify it |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
d868475a | 14 | |
b975b0d5 ZJS |
15 | systemd is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
d868475a | 19 | |
b975b0d5 ZJS |
20 | You should have received a copy of the GNU Lesser General Public License |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
d868475a ZJS |
22 | --> |
23 | ||
3fde5f30 | 24 | <refentry id="systemd.resource-control"> |
d868475a | 25 | <refentryinfo> |
3fde5f30 | 26 | <title>systemd.resource-control</title> |
d868475a ZJS |
27 | <productname>systemd</productname> |
28 | ||
29 | <authorgroup> | |
30 | <author> | |
31 | <contrib>Developer</contrib> | |
32 | <firstname>Lennart</firstname> | |
33 | <surname>Poettering</surname> | |
34 | <email>lennart@poettering.net</email> | |
35 | </author> | |
36 | </authorgroup> | |
37 | </refentryinfo> | |
38 | ||
39 | <refmeta> | |
3fde5f30 | 40 | <refentrytitle>systemd.resource-control</refentrytitle> |
d868475a ZJS |
41 | <manvolnum>5</manvolnum> |
42 | </refmeta> | |
43 | ||
44 | <refnamediv> | |
3fde5f30 LP |
45 | <refname>systemd.resource-control</refname> |
46 | <refpurpose>Resource control unit settings</refpurpose> | |
d868475a ZJS |
47 | </refnamediv> |
48 | ||
49 | <refsynopsisdiv> | |
50 | <para> | |
51 | <filename><replaceable>slice</replaceable>.slice</filename>, | |
52 | <filename><replaceable>scope</replaceable>.scope</filename>, | |
53 | <filename><replaceable>service</replaceable>.service</filename>, | |
54 | <filename><replaceable>socket</replaceable>.socket</filename>, | |
55 | <filename><replaceable>mount</replaceable>.mount</filename>, | |
56 | <filename><replaceable>swap</replaceable>.swap</filename> | |
57 | </para> | |
58 | </refsynopsisdiv> | |
59 | ||
60 | <refsect1> | |
61 | <title>Description</title> | |
62 | ||
63 | <para>Unit configuration files for services, slices, scopes, | |
64 | sockets, mount points, and swap devices share a subset of | |
3fde5f30 | 65 | configuration options for resource control of spawned |
72f4d966 | 66 | processes. Internally, this relies on the Control Groups |
9b0374e9 | 67 | kernel concept for organizing processes in a hierarchical tree of |
3fde5f30 | 68 | named groups for the purpose of resource management.</para> |
9365b048 | 69 | |
d868475a ZJS |
70 | <para>This man page lists the configuration options shared by |
71 | those six unit types. See | |
72 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
73 | for the common options of all unit configuration files, and | |
74 | <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
75 | <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
76 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
77 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
78 | <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
79 | and | |
80 | <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
81 | for more information on the specific unit configuration files. The | |
3fde5f30 | 82 | resource control configuration options are configured in the |
d868475a ZJS |
83 | [Slice], [Scope], [Service], [Socket], [Mount], or [Swap] |
84 | sections, depending on the unit type.</para> | |
ea021cc3 LP |
85 | |
86 | <para>See the <ulink | |
87 | url="http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New | |
72f4d966 | 88 | Control Group Interfaces</ulink> for an introduction on how to make |
ea021cc3 | 89 | use of resource control APIs from programs.</para> |
d868475a ZJS |
90 | </refsect1> |
91 | ||
c129bd5d LP |
92 | <refsect1> |
93 | <title>Automatic Dependencies</title> | |
94 | ||
95 | <para>Units with the <varname>Slice=</varname> setting set get | |
96 | automatic <varname>Requires=</varname> and | |
97 | <varname>After=</varname> dependencies on the specified slice | |
98 | unit.</para> | |
99 | </refsect1> | |
100 | ||
d868475a ZJS |
101 | <refsect1> |
102 | <title>Options</title> | |
103 | ||
104 | <para>Units of the types listed above can have settings | |
3fde5f30 | 105 | for resource control configuration:</para> |
d868475a ZJS |
106 | |
107 | <variablelist class='unit-directives'> | |
d868475a ZJS |
108 | |
109 | <varlistentry> | |
61ad59b1 | 110 | <term><varname>CPUAccounting=</varname></term> |
d868475a ZJS |
111 | |
112 | <listitem> | |
61ad59b1 LP |
113 | <para>Turn on CPU usage accounting for this unit. Takes a |
114 | boolean argument. Note that turning on CPU accounting for | |
03a7b521 | 115 | one unit will also implicitly turn it on for all units |
085afe36 LP |
116 | contained in the same slice and for all its parent slices |
117 | and the units contained therein. The system default for this | |
03a7b521 | 118 | setting may be controlled with |
085afe36 LP |
119 | <varname>DefaultCPUAccounting=</varname> in |
120 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
d868475a ZJS |
121 | </listitem> |
122 | </varlistentry> | |
123 | ||
d868475a ZJS |
124 | <varlistentry> |
125 | <term><varname>CPUShares=<replaceable>weight</replaceable></varname></term> | |
db785129 | 126 | <term><varname>StartupCPUShares=<replaceable>weight</replaceable></varname></term> |
d868475a ZJS |
127 | |
128 | <listitem> | |
b2f8b02e | 129 | <para>Assign the specified CPU time share weight to the |
d53d9474 | 130 | processes executed. These options take an integer value and |
b9acccb3 | 131 | control the <literal>cpu.shares</literal> control group |
d53d9474 LP |
132 | attribute. The allowed range is 2 to 262144. Defaults to |
133 | 1024. For details about this control group attribute, see | |
134 | <ulink | |
db785129 | 135 | url="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">sched-design-CFS.txt</ulink>. |
b9acccb3 ZJS |
136 | The available CPU time is split up among all units within |
137 | one slice relative to their CPU time share weight.</para> | |
b2f8b02e | 138 | |
db785129 LP |
139 | <para>While <varname>StartupCPUShares=</varname> only |
140 | applies to the startup phase of the system, | |
b9acccb3 ZJS |
141 | <varname>CPUShares=</varname> applies to normal runtime of |
142 | the system, and if the former is not set also to the startup | |
143 | phase. Using <varname>StartupCPUShares=</varname> allows | |
9b0374e9 | 144 | prioritizing specific services at boot-up differently than |
b9acccb3 ZJS |
145 | during normal runtime.</para> |
146 | ||
03a7b521 | 147 | <para>These options imply |
b9acccb3 | 148 | <literal>CPUAccounting=true</literal>.</para> |
b2f8b02e LP |
149 | </listitem> |
150 | </varlistentry> | |
151 | ||
152 | <varlistentry> | |
153 | <term><varname>CPUQuota=</varname></term> | |
154 | ||
155 | <listitem> | |
156 | <para>Assign the specified CPU time quota to the processes | |
9a054909 LP |
157 | executed. Takes a percentage value, suffixed with "%". The |
158 | percentage specifies how much CPU time the unit shall get at | |
159 | maximum, relative to the total CPU time available on one | |
9b0374e9 | 160 | CPU. Use values > 100% for allotting CPU time on more than |
9a054909 | 161 | one CPU. This controls the |
b2f8b02e LP |
162 | <literal>cpu.cfs_quota_us</literal> control group |
163 | attribute. For details about this control group attribute, | |
164 | see <ulink | |
165 | url="https://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">sched-design-CFS.txt</ulink>.</para> | |
166 | ||
80d3d25d | 167 | <para>Example: <varname>CPUQuota=20%</varname> ensures that |
b2f8b02e LP |
168 | the executed processes will never get more than 20% CPU time |
169 | on one CPU.</para> | |
170 | ||
171 | <para>Implies <literal>CPUAccounting=true</literal>.</para> | |
172 | </listitem> | |
173 | </varlistentry> | |
174 | ||
61ad59b1 LP |
175 | <varlistentry> |
176 | <term><varname>MemoryAccounting=</varname></term> | |
177 | ||
178 | <listitem> | |
179 | <para>Turn on process and kernel memory accounting for this | |
180 | unit. Takes a boolean argument. Note that turning on memory | |
03a7b521 LP |
181 | accounting for one unit will also implicitly turn it on for |
182 | all units contained in the same slice and for all its parent | |
183 | slices and the units contained therein. The system default | |
184 | for this setting may be controlled with | |
085afe36 LP |
185 | <varname>DefaultMemoryAccounting=</varname> in |
186 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
61ad59b1 LP |
187 | </listitem> |
188 | </varlistentry> | |
189 | ||
d868475a ZJS |
190 | <varlistentry> |
191 | <term><varname>MemoryLimit=<replaceable>bytes</replaceable></varname></term> | |
d868475a ZJS |
192 | |
193 | <listitem> | |
ddca82ac LP |
194 | <para>Specify the limit on maximum memory usage of the |
195 | executed processes. The limit specifies how much process and | |
196 | kernel memory can be used by tasks in this unit. Takes a | |
d868475a | 197 | memory size in bytes. If the value is suffixed with K, M, G |
6a75304e | 198 | or T, the specified memory size is parsed as Kilobytes, |
d868475a | 199 | Megabytes, Gigabytes, or Terabytes (with the base 1024), |
03a7b521 | 200 | respectively. If assigned the special value |
b938cb90 | 201 | <literal>infinity</literal>, no memory limit is applied. This |
03a7b521 LP |
202 | controls the <literal>memory.limit_in_bytes</literal> |
203 | control group attribute. For details about this control | |
204 | group attribute, see <ulink | |
6ed80a4e | 205 | url="https://www.kernel.org/doc/Documentation/cgroups/memory.txt">memory.txt</ulink>.</para> |
d868475a ZJS |
206 | |
207 | <para>Implies <literal>MemoryAccounting=true</literal>.</para> | |
208 | </listitem> | |
209 | </varlistentry> | |
210 | ||
03a7b521 LP |
211 | <varlistentry> |
212 | <term><varname>TasksAccounting=</varname></term> | |
213 | ||
214 | <listitem> | |
215 | <para>Turn on task accounting for this unit. Takes a | |
216 | boolean argument. If enabled, the system manager will keep | |
217 | track of the number of tasks in the unit. The number of | |
218 | tasks accounted this way includes both kernel threads and | |
219 | userspace processes, with each thread counting | |
220 | individually. Note that turning on tasks accounting for one | |
221 | unit will also implicitly turn it on for all units contained | |
222 | in the same slice and for all its parent slices and the | |
223 | units contained therein. The system default for this setting | |
224 | may be controlled with | |
225 | <varname>DefaultTasksAccounting=</varname> in | |
226 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
227 | </listitem> | |
228 | </varlistentry> | |
229 | ||
230 | <varlistentry> | |
231 | <term><varname>TasksMax=<replaceable>N</replaceable></varname></term> | |
232 | ||
233 | <listitem> | |
234 | <para>Specify the maximum number of tasks that may be | |
235 | created in the unit. This ensures that the number of tasks | |
236 | accounted for the unit (see above) stays below a specific | |
237 | limit. If assigned the special value | |
b938cb90 | 238 | <literal>infinity</literal>, no tasks limit is applied. This |
03a7b521 LP |
239 | controls the <literal>pids.max</literal> control group |
240 | attribute. For details about this control group attribute, | |
241 | see <ulink | |
242 | url="https://www.kernel.org/doc/Documentation/cgroups/pids.txt">pids.txt</ulink>.</para> | |
243 | ||
0af20ea2 LP |
244 | <para>Implies <literal>TasksAccounting=true</literal>. The |
245 | system default for this setting may be controlled with | |
246 | <varname>DefaultTasksMax=</varname> in | |
247 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
03a7b521 LP |
248 | </listitem> |
249 | </varlistentry> | |
250 | ||
61ad59b1 LP |
251 | <varlistentry> |
252 | <term><varname>BlockIOAccounting=</varname></term> | |
253 | ||
254 | <listitem> | |
b938cb90 JE |
255 | <para>Turn on Block I/O accounting for this unit. Takes a |
256 | boolean argument. Note that turning on block I/O accounting | |
03a7b521 | 257 | for one unit will also implicitly turn it on for all units |
085afe36 LP |
258 | contained in the same slice and all for its parent slices |
259 | and the units contained therein. The system default for this | |
03a7b521 | 260 | setting may be controlled with |
085afe36 LP |
261 | <varname>DefaultBlockIOAccounting=</varname> in |
262 | <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> | |
61ad59b1 LP |
263 | </listitem> |
264 | </varlistentry> | |
265 | ||
d868475a ZJS |
266 | <varlistentry> |
267 | <term><varname>BlockIOWeight=<replaceable>weight</replaceable></varname></term> | |
db785129 | 268 | <term><varname>StartupBlockIOWeight=<replaceable>weight</replaceable></varname></term> |
d868475a | 269 | |
b938cb90 | 270 | <listitem><para>Set the default overall block I/O weight for |
db785129 | 271 | the executed processes. Takes a single weight value (between |
b938cb90 | 272 | 10 and 1000) to set the default block I/O weight. This controls |
db785129 | 273 | the <literal>blkio.weight</literal> control group attribute, |
d53d9474 | 274 | which defaults to 500. For details about this control group |
db785129 LP |
275 | attribute, see <ulink |
276 | url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>. | |
b938cb90 JE |
277 | The available I/O bandwidth is split up among all units within |
278 | one slice relative to their block I/O weight.</para> | |
db785129 LP |
279 | |
280 | <para>While <varname>StartupBlockIOWeight=</varname> only | |
281 | applies to the startup phase of the system, | |
282 | <varname>BlockIOWeight=</varname> applies to the later runtime | |
283 | of the system, and if the former is not set also to the | |
9b0374e9 | 284 | startup phase. This allows prioritizing specific services at |
db785129 | 285 | boot-up differently than during runtime.</para> |
61ad59b1 LP |
286 | |
287 | <para>Implies | |
288 | <literal>BlockIOAccounting=true</literal>.</para> | |
289 | </listitem> | |
d868475a ZJS |
290 | </varlistentry> |
291 | ||
292 | <varlistentry> | |
293 | <term><varname>BlockIODeviceWeight=<replaceable>device</replaceable> <replaceable>weight</replaceable></varname></term> | |
294 | ||
295 | <listitem> | |
b938cb90 | 296 | <para>Set the per-device overall block I/O weight for the |
d868475a ZJS |
297 | executed processes. Takes a space-separated pair of a file |
298 | path and a weight value to specify the device specific | |
299 | weight value, between 10 and 1000. (Example: "/dev/sda | |
300 | 500"). The file path may be specified as path to a block | |
72f4d966 | 301 | device node or as any other file, in which case the backing |
d868475a ZJS |
302 | block device of the file system of the file is |
303 | determined. This controls the | |
304 | <literal>blkio.weight_device</literal> control group | |
305 | attribute, which defaults to 1000. Use this option multiple | |
306 | times to set weights for multiple devices. For details about | |
6a75304e | 307 | this control group attribute, see <ulink |
6ed80a4e | 308 | url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.</para> |
61ad59b1 LP |
309 | |
310 | <para>Implies | |
311 | <literal>BlockIOAccounting=true</literal>.</para> | |
d868475a ZJS |
312 | </listitem> |
313 | </varlistentry> | |
314 | ||
315 | <varlistentry> | |
316 | <term><varname>BlockIOReadBandwidth=<replaceable>device</replaceable> <replaceable>bytes</replaceable></varname></term> | |
317 | <term><varname>BlockIOWriteBandwidth=<replaceable>device</replaceable> <replaceable>bytes</replaceable></varname></term> | |
318 | ||
319 | <listitem> | |
b938cb90 | 320 | <para>Set the per-device overall block I/O bandwidth limit |
d868475a ZJS |
321 | for the executed processes. Takes a space-separated pair of |
322 | a file path and a bandwidth value (in bytes per second) to | |
323 | specify the device specific bandwidth. The file path may be | |
324 | a path to a block device node, or as any other file in which | |
325 | case the backing block device of the file system of the file | |
6a75304e | 326 | is used. If the bandwidth is suffixed with K, M, G, or T, |
d868475a | 327 | the specified bandwidth is parsed as Kilobytes, Megabytes, |
5556b5fe LP |
328 | Gigabytes, or Terabytes, respectively, to the base of |
329 | 1000. (Example: | |
d868475a ZJS |
330 | "/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 5M"). This |
331 | controls the <literal>blkio.read_bps_device</literal> and | |
332 | <literal>blkio.write_bps_device</literal> control group | |
333 | attributes. Use this option multiple times to set bandwidth | |
334 | limits for multiple devices. For details about these control | |
5556b5fe LP |
335 | group attributes, see <ulink |
336 | url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>. | |
d868475a | 337 | </para> |
61ad59b1 LP |
338 | |
339 | <para>Implies | |
340 | <literal>BlockIOAccounting=true</literal>.</para> | |
d868475a ZJS |
341 | </listitem> |
342 | </varlistentry> | |
343 | ||
344 | <varlistentry> | |
345 | <term><varname>DeviceAllow=</varname></term> | |
346 | ||
347 | <listitem> | |
348 | <para>Control access to specific device nodes by the | |
349 | executed processes. Takes two space-separated strings: a | |
90060676 LP |
350 | device node specifier followed by a combination of |
351 | <constant>r</constant>, <constant>w</constant>, | |
352 | <constant>m</constant> to control | |
d868475a | 353 | <emphasis>r</emphasis>eading, <emphasis>w</emphasis>riting, |
90060676 | 354 | or creation of the specific device node(s) by the unit |
d868475a ZJS |
355 | (<emphasis>m</emphasis>knod), respectively. This controls |
356 | the <literal>devices.allow</literal> and | |
357 | <literal>devices.deny</literal> control group | |
90060676 LP |
358 | attributes. For details about these control group |
359 | attributes, see <ulink | |
6ed80a4e | 360 | url="https://www.kernel.org/doc/Documentation/cgroups/devices.txt">devices.txt</ulink>.</para> |
90060676 LP |
361 | |
362 | <para>The device node specifier is either a path to a device | |
363 | node in the file system, starting with | |
364 | <filename>/dev/</filename>, or a string starting with either | |
365 | <literal>char-</literal> or <literal>block-</literal> | |
366 | followed by a device group name, as listed in | |
367 | <filename>/proc/devices</filename>. The latter is useful to | |
368 | whitelist all current and future devices belonging to a | |
e41969e3 LP |
369 | specific device group at once. The device group is matched |
370 | according to file name globbing rules, you may hence use the | |
371 | <literal>*</literal> and <literal>?</literal> | |
372 | wildcards. Examples: <filename>/dev/sda5</filename> is a | |
373 | path to a device node, referring to an ATA or SCSI block | |
90060676 LP |
374 | device. <literal>char-pts</literal> and |
375 | <literal>char-alsa</literal> are specifiers for all pseudo | |
e41969e3 LP |
376 | TTYs and all ALSA sound devices, |
377 | respectively. <literal>char-cpu/*</literal> is a specifier | |
378 | matching all CPU related device groups.</para> | |
d868475a ZJS |
379 | </listitem> |
380 | </varlistentry> | |
381 | ||
382 | <varlistentry> | |
383 | <term><varname>DevicePolicy=auto|closed|strict</varname></term> | |
384 | ||
385 | <listitem> | |
386 | <para> | |
387 | Control the policy for allowing device access: | |
388 | </para> | |
389 | <variablelist> | |
390 | <varlistentry> | |
391 | <term><option>strict</option></term> | |
392 | <listitem> | |
393 | <para>means to only allow types of access that are | |
394 | explicitly specified.</para> | |
395 | </listitem> | |
396 | </varlistentry> | |
397 | ||
398 | <varlistentry> | |
399 | <term><option>closed</option></term> | |
400 | <listitem> | |
6a75304e | 401 | <para>in addition, allows access to standard pseudo |
d868475a ZJS |
402 | devices including |
403 | <filename>/dev/null</filename>, | |
404 | <filename>/dev/zero</filename>, | |
405 | <filename>/dev/full</filename>, | |
406 | <filename>/dev/random</filename>, and | |
407 | <filename>/dev/urandom</filename>. | |
408 | </para> | |
409 | </listitem> | |
410 | </varlistentry> | |
411 | ||
412 | <varlistentry> | |
413 | <term><option>auto</option></term> | |
414 | <listitem> | |
415 | <para> | |
6a75304e | 416 | in addition, allows access to all devices if no |
d868475a ZJS |
417 | explicit <varname>DeviceAllow=</varname> is present. |
418 | This is the default. | |
419 | </para> | |
420 | </listitem> | |
421 | </varlistentry> | |
422 | </variablelist> | |
423 | </listitem> | |
424 | </varlistentry> | |
61ad59b1 | 425 | |
d817000d LP |
426 | <varlistentry> |
427 | <term><varname>NetClass=</varname></term> | |
428 | <listitem><para>Configures a network class number to assign to the | |
429 | unit. This value will be set to the | |
430 | <literal>net_cls.class_id</literal> property of the | |
431 | <literal>net_cls</literal> cgroup of the unit. The directive | |
432 | accepts a numerical value (for fixed number assignment) and the keyword | |
433 | <literal>auto</literal> (for dynamic allocation). Network traffic of | |
434 | all processes inside the unit will have the network class ID assigned | |
435 | by the kernel. Also see | |
436 | the kernel docs for | |
437 | <ulink url="https://www.kernel.org/doc/Documentation/cgroups/net_cls.txt">net_cls controller</ulink> | |
438 | and | |
439 | <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
440 | </para></listitem> | |
441 | </varlistentry> | |
442 | ||
61ad59b1 LP |
443 | <varlistentry> |
444 | <term><varname>Slice=</varname></term> | |
445 | ||
446 | <listitem> | |
447 | <para>The name of the slice unit to place the unit | |
448 | in. Defaults to <filename>system.slice</filename> for all | |
dc7adf20 LP |
449 | non-instantiated units of all unit types (except for slice |
450 | units themselves see below). Instance units are by default | |
451 | placed in a subslice of <filename>system.slice</filename> | |
452 | that is named after the template name.</para> | |
453 | ||
454 | <para>This option may be used to arrange systemd units in a | |
455 | hierarchy of slices each of which might have resource | |
456 | settings applied.</para> | |
61ad59b1 | 457 | |
fbce1139 | 458 | <para>For units of type slice, the only accepted value for |
61ad59b1 | 459 | this setting is the parent slice. Since the name of a slice |
fbce1139 | 460 | unit implies the parent slice, it is hence redundant to ever |
61ad59b1 LP |
461 | set this parameter directly for slice units.</para> |
462 | </listitem> | |
463 | </varlistentry> | |
464 | ||
a931ad47 LP |
465 | <varlistentry> |
466 | <term><varname>Delegate=</varname></term> | |
467 | ||
468 | <listitem> | |
469 | <para>Turns on delegation of further resource control | |
9b0374e9 | 470 | partitioning to processes of the unit. For unprivileged |
a931ad47 | 471 | services (i.e. those using the <varname>User=</varname> |
b938cb90 | 472 | setting), this allows processes to create a subhierarchy |
9b0374e9 | 473 | beneath its control group path. For privileged services and |
b938cb90 | 474 | scopes, this ensures the processes will have all control |
a931ad47 LP |
475 | group controllers enabled.</para> |
476 | </listitem> | |
477 | </varlistentry> | |
478 | ||
d868475a ZJS |
479 | </variablelist> |
480 | </refsect1> | |
481 | ||
482 | <refsect1> | |
483 | <title>See Also</title> | |
484 | <para> | |
485 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
486 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
487 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
488 | <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
489 | <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
490 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
491 | <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
492 | <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
493 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | |
61ad59b1 | 494 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>, |
d868475a | 495 | The documentation for control groups and specific controllers in the Linux kernel: |
6ed80a4e JSJ |
496 | <ulink url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>, |
497 | <ulink url="https://www.kernel.org/doc/Documentation/cgroups/cpuacct.txt">cpuacct.txt</ulink>, | |
498 | <ulink url="https://www.kernel.org/doc/Documentation/cgroups/memory.txt">memory.txt</ulink>, | |
499 | <ulink url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>. | |
d868475a ZJS |
500 | </para> |
501 | </refsect1> | |
502 | </refentry> |