1 <?xml version='
1.0'
?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
8 Copyright © 2013 Zbigniew Jędrzejewski-Szmek
11 <refentry id=
"systemd.slice">
13 <title>systemd.slice
</title>
14 <productname>systemd
</productname>
18 <contrib>Developer
</contrib>
19 <firstname>Lennart
</firstname>
20 <surname>Poettering
</surname>
21 <email>lennart@poettering.net
</email>
27 <refentrytitle>systemd.slice
</refentrytitle>
28 <manvolnum>5</manvolnum>
32 <refname>systemd.slice
</refname>
33 <refpurpose>Slice unit configuration
</refpurpose>
37 <para><filename><replaceable>slice
</replaceable>.slice
</filename></para>
41 <title>Description
</title>
43 <para>A unit configuration file whose name ends in
<literal>.slice
</literal> encodes information about a slice
44 unit. A slice unit is a concept for hierarchically managing resources of a group of processes. This management is
45 performed by creating a node in the Linux Control Group (cgroup) tree. Units that manage processes (primarily scope
46 and service units) may be assigned to a specific slice. For each slice, certain resource limits may be set that
47 apply to all processes of all units contained in that slice. Slices are organized hierarchically in a tree. The
48 name of the slice encodes the location in the tree. The name consists of a dash-separated series of names, which
49 describes the path to the slice from the root slice. The root slice is named
<filename>-.slice
</filename>. Example:
50 <filename>foo-bar.slice
</filename> is a slice that is located within
<filename>foo.slice
</filename>, which in turn
51 is located in the root slice
<filename>-.slice
</filename>.
54 <para>Note that slice units cannot be templated, nor is possible to add multiple names to a slice unit by creating
55 additional symlinks to its unit file.
</para>
57 <para>By default, service and scope units are placed in
58 <filename>system.slice
</filename>, virtual machines and containers
60 <citerefentry><refentrytitle>systemd-machined
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
61 are found in
<filename>machine.slice
</filename>, and user sessions
63 <citerefentry><refentrytitle>systemd-logind
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
64 in
<filename>user.slice
</filename>. See
65 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
66 for more information.
</para>
69 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
70 for the common options of all unit configuration
71 files. The common configuration items are configured
72 in the generic [Unit] and [Install] sections. The
73 slice specific configuration options are configured in
74 the [Slice] section. Currently, only generic resource control settings
76 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry> are allowed.
80 url=
"https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
81 Control Group Interfaces
</ulink> for an introduction on how to make
82 use of slice units from programs.
</para>
86 <title>Automatic Dependencies
</title>
89 <title>Implicit Dependencies
</title>
91 <para>The following dependencies are implicitly added:
</para>
94 <listitem><para>Slice units automatically gain dependencies of type
95 <varname>After=
</varname> and
<varname>Requires=
</varname> on
96 their immediate parent slice unit.
</para></listitem>
101 <title>Default Dependencies
</title>
103 <para>The following dependencies are added unless
<varname>DefaultDependencies=no
</varname> is set:
</para>
106 <listitem><para>Slice units will automatically have dependencies of type
<varname>Conflicts=
</varname> and
107 <varname>Before=
</varname> on
108 <filename>shutdown.target
</filename>. These ensure that slice units are removed prior to system shutdown.
109 Only slice units involved with late system shutdown should disable
110 <varname>DefaultDependencies=
</varname> option.
</para></listitem>
116 <title>See Also
</title>
118 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
119 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
120 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
121 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
122 <citerefentry><refentrytitle>systemd.scope
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
123 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
124 <citerefentry><refentrytitle>systemd.directives
</refentrytitle><manvolnum>7</manvolnum></citerefentry>