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 This file is part of systemd.
10 Copyright 2013 Zbigniew Jędrzejewski-Szmek
13 <refentry id=
"systemd.slice">
15 <title>systemd.slice
</title>
16 <productname>systemd
</productname>
20 <contrib>Developer
</contrib>
21 <firstname>Lennart
</firstname>
22 <surname>Poettering
</surname>
23 <email>lennart@poettering.net
</email>
29 <refentrytitle>systemd.slice
</refentrytitle>
30 <manvolnum>5</manvolnum>
34 <refname>systemd.slice
</refname>
35 <refpurpose>Slice unit configuration
</refpurpose>
39 <para><filename><replaceable>slice
</replaceable>.slice
</filename></para>
43 <title>Description
</title>
45 <para>A unit configuration file whose name ends in
<literal>.slice
</literal> encodes information about a slice
46 unit. A slice unit is a concept for hierarchically managing resources of a group of processes. This management is
47 performed by creating a node in the Linux Control Group (cgroup) tree. Units that manage processes (primarily scope
48 and service units) may be assigned to a specific slice. For each slice, certain resource limits may be set that
49 apply to all processes of all units contained in that slice. Slices are organized hierarchically in a tree. The
50 name of the slice encodes the location in the tree. The name consists of a dash-separated series of names, which
51 describes the path to the slice from the root slice. The root slice is named
<filename>-.slice
</filename>. Example:
52 <filename>foo-bar.slice
</filename> is a slice that is located within
<filename>foo.slice
</filename>, which in turn
53 is located in the root slice
<filename>-.slice
</filename>.
56 <para>Note that slice units cannot be templated, nor is possible to add multiple names to a slice unit by creating
57 additional symlinks to its unit file.
</para>
59 <para>By default, service and scope units are placed in
60 <filename>system.slice
</filename>, virtual machines and containers
62 <citerefentry><refentrytitle>systemd-machined
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
63 are found in
<filename>machine.slice
</filename>, and user sessions
65 <citerefentry><refentrytitle>systemd-logind
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
66 in
<filename>user.slice
</filename>. See
67 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
68 for more information.
</para>
71 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
72 for the common options of all unit configuration
73 files. The common configuration items are configured
74 in the generic [Unit] and [Install] sections. The
75 slice specific configuration options are configured in
76 the [Slice] section. Currently, only generic resource control settings
78 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry> are allowed.
82 url=
"https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New
83 Control Group Interfaces
</ulink> for an introduction on how to make
84 use of slice units from programs.
</para>
88 <title>Automatic Dependencies
</title>
91 <title>Implicit Dependencies
</title>
93 <para>The following dependencies are implicitly added:
</para>
96 <listitem><para>Slice units automatically gain dependencies of type
97 <varname>After=
</varname> and
<varname>Requires=
</varname> on
98 their immediate parent slice unit.
</para></listitem>
103 <title>Default Dependencies
</title>
105 <para>The following dependencies are added unless
<varname>DefaultDependencies=no
</varname> is set:
</para>
108 <listitem><para>Slice units will automatically have dependencies of type
<varname>Conflicts=
</varname> and
109 <varname>Before=
</varname> on
110 <filename>shutdown.target
</filename>. These ensure that slice units are removed prior to system shutdown.
111 Only slice units involved with late system shutdown should disable
112 <varname>DefaultDependencies=
</varname> option.
</para></listitem>
118 <title>See Also
</title>
120 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
121 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
122 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
123 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
124 <citerefentry><refentrytitle>systemd.scope
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
125 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
126 <citerefentry><refentrytitle>systemd.directives
</refentrytitle><manvolnum>7</manvolnum></citerefentry>