for cgroup configuration:</para>
<variablelist class='unit-directives'>
- <varlistentry>
- <term><varname>CPUAccounting=</varname></term>
-
- <listitem>
- <para>Turn on CPU usage accounting for this
- unit.</para>
- </listitem>
- </varlistentry>
<varlistentry>
- <term><varname>BlockIOAccounting=</varname></term>
-
- <listitem>
- <para>Turn on Block IO bandwidth accounting
- for this unit.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><varname>MemoryAccounting=</varname></term>
+ <term><varname>CPUAccounting=</varname></term>
<listitem>
- <para>Turn on process and kernel memory
- accounting for this unit.</para>
+ <para>Turn on CPU usage accounting for this unit. Takes a
+ boolean argument. Note that turning on CPU accounting for
+ one unit might also implicitly turn it on for all units
+ contained in the same slice and for all its parent slices and
+ the units contained therein.</para>
</listitem>
</varlistentry>
-
<varlistentry>
<term><varname>CPUShares=<replaceable>weight</replaceable></varname></term>
</varlistentry>
<varlistentry>
+ <term><varname>MemoryAccounting=</varname></term>
+
+ <listitem>
+ <para>Turn on process and kernel memory accounting for this
+ unit. Takes a boolean argument. Note that turning on memory
+ accounting for one unit might also implicitly turn it on for
+ all units contained in the same slice and for all its parent
+ slices and the units contained therein.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>MemoryLimit=<replaceable>bytes</replaceable></varname></term>
<term><varname>MemorySoftLimit=<replaceable>bytes</replaceable></varname></term>
</varlistentry>
<varlistentry>
+ <term><varname>BlockIOAccounting=</varname></term>
+
+ <listitem>
+ <para>Turn on Block IO accounting for this unit. Takes a
+ boolean argument. Note that turning on block IO accounting
+ for one unit might also implicitly turn it on for all units
+ contained in the same slice and all for its parent slices and
+ the units contained therein.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>BlockIOWeight=<replaceable>weight</replaceable></varname></term>
<listitem><para>Set the default
defaults to 1000. For details about
this control group attribute, see
<ulink
- url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.</para></listitem>
+ url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.</para>
+
+ <para>Implies
+ <literal>BlockIOAccounting=true</literal>.</para>
+ </listitem>
</varlistentry>
<varlistentry>
times to set weights for multiple devices. For details about
this control group attribute, see <ulink
url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.</para>
+
+ <para>Implies
+ <literal>BlockIOAccounting=true</literal>.</para>
</listitem>
</varlistentry>
group attributes, see
<ulink url="https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.
</para>
+
+ <para>Implies
+ <literal>BlockIOAccounting=true</literal>.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><varname>Slice=</varname></term>
+
+ <listitem>
+ <para>The name of the slice unit to place the unit
+ in. Defaults to <filename>system.slice</filename> for all
+ unit types, except for slice units themselves. This may be
+ used to arrange systemd units in a hierarchy of slices each
+ of which might have resource settings applied.</para>
+
+ <para>For units of type slice the only accepted value for
+ this setting is the parent slice. Since the name of a slice
+ unit implies the parent slice it is hence redundant to ever
+ set this parameter directly for slice units.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
The documentation for control groups and specific controllers in the Linux kernel:
<ulink url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>,
<ulink url="https://www.kernel.org/doc/Documentation/cgroups/cpuacct.txt">cpuacct.txt</ulink>,
<term><filename>-.slice</filename></term>
<listitem>
<para>The root slice is the
- root of the hierarchy. It does
- not contain services directly,
- but is used to set defaults
- for the whole tree.</para>
+ root of the hierarchy. It
+ usually does not contain units
+ directly, but may be used to
+ set defaults for the whole
+ tree.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>system.slice</filename></term>
<listitem>
- <para>This slice contains
+ <para>By default all services
services started by
- <command>systemd</command>.</para>
+ <command>systemd</command> are
+ found in this slice.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>user.slice</filename></term>
<listitem>
- <para>This slice contains user
+ <para>By default all user
processes and services started
on behalf of the user,
including the per-user systemd
- instance.</para>
+ instance are found in this
+ slice.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>machine.slice</filename></term>
<listitem>
- <para>This slice contains
- virtual machines and
- containers registered with
- <command>systemd-machined</command>.
+ <para>By defalt all virtual
+ machines and containers
+ registered with
+ <command>systemd-machined</command>
+ are found in this slice.
</para>
</listitem>
</varlistentry>