Debian Codegraph @

upstream/debian-unstable/man5/systemd.slice.5

raw
1 '\" t
2 .TH "SYSTEMD\&.SLICE" "5" "" "systemd 261~rc3" "systemd.slice"
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 systemd.slice \- Slice unit configuration
24 .SH "SYNOPSIS"
25 .PP
26 \fIslice\fR\&.slice
27 .SH "DESCRIPTION"
28 .PP
29 A unit configuration file whose name ends in
30 "\&.slice"
31 encodes information about a slice unit\&. A slice unit is a concept for hierarchically managing resources of a group of processes\&. This management is performed by creating a node in the Linux Control Group (cgroup) tree\&. Units that manage processes (primarily scope and service units) may be assigned to a specific slice\&. For each slice, certain resource limits may be set that apply to all processes of all units contained in that slice\&. Slices are organized hierarchically in a tree\&. The name of the slice encodes the location in the tree\&. The name consists of a dash\-separated series of names, which describes the path to the slice from the root slice\&. The root slice is named
32 \-\&.slice\&. Example:
33 foo\-bar\&.slice
34 is a slice that is located within
35 foo\&.slice, which in turn is located in the root slice
36 \-\&.slice\&.
37 .PP
38 Note that slice units cannot be templated, nor is possible to add multiple names to a slice unit by creating additional symlinks to its unit file\&.
39 .PP
40 By default, service and scope units are placed in
41 system\&.slice, virtual machines and containers registered with
42 \fBsystemd-machined\fR(8)
43 are found in
44 machine\&.slice, and user sessions handled by
45 \fBsystemd-logind\fR(8)
46 in
47 user\&.slice\&. See
48 \fBsystemd.special\fR(7)
49 for more information\&.
50 .PP
51 See
52 \fBsystemd.unit\fR(5)
53 for the common options of all unit configuration files\&. The common configuration items are configured in the generic [Unit] and [Install] sections\&. The slice specific configuration options are configured in the [Slice] section\&. Currently, only generic resource control settings as described in
54 \fBsystemd.resource-control\fR(5)
55 are allowed\&.
56 .PP
57 See the
58 \m[blue]\fBNew Control Group Interfaces\fR\m[]\&\s-2\u[1]\d\s+2
59 for an introduction on how to make use of slice units from programs\&.
60 .SH "AUTOMATIC DEPENDENCIES"
61 .SS "Implicit Dependencies"
62 .PP
63 The following dependencies are implicitly added:
64 .sp
65 .RS 4
66 .ie n \{\
67 \h'-04'\(bu\h'+03'\c
68 .\}
69 .el \{\
70 .sp -1
71 .IP \(bu 2.3
72 .\}
73 Slice units automatically gain dependencies of type
74 \fIAfter=\fR
75 and
76 \fIRequires=\fR
77 on their immediate parent slice unit\&.
78 .RE
79 .SS "Default Dependencies"
80 .PP
81 The following dependencies are added unless
82 \fIDefaultDependencies=no\fR
83 is set:
84 .sp
85 .RS 4
86 .ie n \{\
87 \h'-04'\(bu\h'+03'\c
88 .\}
89 .el \{\
90 .sp -1
91 .IP \(bu 2.3
92 .\}
93 Slice units will automatically have dependencies of type
94 \fIConflicts=\fR
95 and
96 \fIBefore=\fR
97 on
98 shutdown\&.target\&. These ensure that slice units are removed prior to system shutdown\&. Only slice units involved with late system shutdown should disable
99 \fIDefaultDependencies=\fR
100 option\&.
101 .RE
102 .SH "OPTIONS"
103 .PP
104 Slice unit files may include [Unit] and [Install] sections, which are described in
105 \fBsystemd.unit\fR(5)\&.
106 .PP
107 Slice files may include a [Slice] section\&. Many options that may be used in this section are shared with other unit types\&. These options are documented in
108 \fBsystemd.resource-control\fR(5)\&.
109 .PP
110 The options specific to the [Slice] section of slice units are the following:
111 .PP
112 \fIConcurrencyHardMax=\fR, \fIConcurrencySoftMax=\fR
113 .RS 4
114 Configures a hard and a soft limit on the maximum number of units assigned to this slice (or any descendent slices) that may be active at the same time\&. If the hard limit is reached no further units associated with the slice may be activated, and their activation will fail with an error\&. If the soft limit is reached any further requested activation of units will be queued, but no immediate error is generated\&. The queued activation job will remain queued until the number of concurrent active units within the slice is below the limit again\&.
115 .sp
116 If the special value
117 "infinity"
118 is specified, no concurrency limit is enforced\&. This is the default\&.
119 .sp
120 Note that if multiple start jobs are queued for units, and all their dependencies are fulfilled they\*(Aqll be processed in an order that is dependent on the unit type, the CPU weight (for unit types that know the concept, such as services), the nice level (similar), and finally in alphabetical order by the unit name\&. This may be used to influence dispatching order when using
121 \fIConcurrencySoftMax=\fR
122 to pace concurrency within a slice unit\&.
123 .sp
124 Note that these options have a hierarchial effect: a limit set for a slice unit will apply to both the units immediately within the slice, but also all units further down the slice tree\&. Also note that each sub\-slice unit counts as one unit each too, and thus when choosing a limit for a slice hierarchy the limit must provide room for both the payload units (i\&.e\&. services, mounts, \&...) and structural units (i\&.e\&. slice units), if any are defined\&.
125 .sp
126 Added in version 258\&.
127 .RE
128 .SH "SEE ALSO"
129 .PP
130 \fBsystemd\fR(1), \fBsystemd.unit\fR(5), \fBsystemd.resource-control\fR(5), \fBsystemd.service\fR(5), \fBsystemd.scope\fR(5), \fBsystemd.special\fR(7), \fBsystemd.directives\fR(7)
131 .SH "NOTES"
132 .IP " 1." 4
133 New Control Group Interfaces
134 .RS 4
135 \%https://systemd.io/CONTROL_GROUP_INTERFACE
136 .RE