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+ -->
6 <refentry id=
"systemd.slice">
8 <title>systemd.slice
</title>
9 <productname>systemd
</productname>
13 <refentrytitle>systemd.slice
</refentrytitle>
14 <manvolnum>5</manvolnum>
18 <refname>systemd.slice
</refname>
19 <refpurpose>Slice unit configuration
</refpurpose>
23 <para><filename><replaceable>slice
</replaceable>.slice
</filename></para>
27 <title>Description
</title>
29 <para>A unit configuration file whose name ends in
<literal>.slice
</literal> encodes information about a slice
30 unit. A slice unit is a concept for hierarchically managing resources of a group of processes. This management is
31 performed by creating a node in the Linux Control Group (cgroup) tree. Units that manage processes (primarily scope
32 and service units) may be assigned to a specific slice. For each slice, certain resource limits may be set that
33 apply to all processes of all units contained in that slice. Slices are organized hierarchically in a tree. The
34 name of the slice encodes the location in the tree. The name consists of a dash-separated series of names, which
35 describes the path to the slice from the root slice. The root slice is named
<filename>-.slice
</filename>. Example:
36 <filename>foo-bar.slice
</filename> is a slice that is located within
<filename>foo.slice
</filename>, which in turn
37 is located in the root slice
<filename>-.slice
</filename>.
40 <para>Note that slice units cannot be templated, nor is possible to add multiple names to a slice unit by creating
41 additional symlinks to its unit file.
</para>
43 <para>By default, service and scope units are placed in
44 <filename>system.slice
</filename>, virtual machines and containers
46 <citerefentry><refentrytitle>systemd-machined
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
47 are found in
<filename>machine.slice
</filename>, and user sessions
49 <citerefentry><refentrytitle>systemd-logind
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
50 in
<filename>user.slice
</filename>. See
51 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
52 for more information.
</para>
55 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
56 for the common options of all unit configuration
57 files. The common configuration items are configured
58 in the generic [Unit] and [Install] sections. The
59 slice specific configuration options are configured in
60 the [Slice] section. Currently, only generic resource control settings
62 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry> are allowed.
66 url=
"https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
67 Control Group Interfaces
</ulink> for an introduction on how to make
68 use of slice units from programs.
</para>
72 <title>Automatic Dependencies
</title>
75 <title>Implicit Dependencies
</title>
77 <para>The following dependencies are implicitly added:
</para>
80 <listitem><para>Slice units automatically gain dependencies of type
81 <varname>After=
</varname> and
<varname>Requires=
</varname> on
82 their immediate parent slice unit.
</para></listitem>
87 <title>Default Dependencies
</title>
89 <para>The following dependencies are added unless
<varname>DefaultDependencies=no
</varname> is set:
</para>
92 <listitem><para>Slice units will automatically have dependencies of type
<varname>Conflicts=
</varname> and
93 <varname>Before=
</varname> on
94 <filename>shutdown.target
</filename>. These ensure that slice units are removed prior to system shutdown.
95 Only slice units involved with late system shutdown should disable
96 <varname>DefaultDependencies=
</varname> option.
</para></listitem>
102 <title>See Also
</title>
104 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
105 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
108 <citerefentry><refentrytitle>systemd.scope
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>systemd.directives
</refentrytitle><manvolnum>7</manvolnum></citerefentry>