From 13c31542cc57e1454dccd6383bfdac98cbee5bb1 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 5 May 2016 16:42:55 -0400 Subject: core: add io controller support on the unified hierarchy On the unified hierarchy, blkio controller is renamed to io and the interface is changed significantly. * blkio.weight and blkio.weight_device are consolidated into io.weight which uses the standardized weight range [1, 10000] with 100 as the default value. * blkio.throttle.{read|write}_{bps|iops}_device are consolidated into io.max. Expansion of throttling features is being worked on to support work-conserving absolute limits (io.low and io.high). * All stats are consolidated into io.stats. This patchset adds support for the new interface. As the interface has been revamped and new features are expected to be added, it seems best to treat it as a separate controller rather than trying to expand the blkio settings although we might add automatic translation if only blkio settings are specified. * io.weight handling is mostly identical to blkio.weight[_device] handling except that the weight range is different. * Both read and write bandwidth settings are consolidated into CGroupIODeviceLimit which describes all limits applicable to the device. This makes it less painful to add new limits. * "max" can be used to specify the maximum limit which is equivalent to no config for max limits and treated as such. If a given CGroupIODeviceLimit doesn't contain any non-default configs, the config struct is discarded once the no limit config is applied to cgroup. * lookup_blkio_device() is renamed to lookup_block_device(). Signed-off-by: Tejun Heo --- man/systemd.resource-control.xml | 108 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 3 deletions(-) (limited to 'man/systemd.resource-control.xml') diff --git a/man/systemd.resource-control.xml b/man/systemd.resource-control.xml index fd6f7a1b69..4edb1a25a8 100644 --- a/man/systemd.resource-control.xml +++ b/man/systemd.resource-control.xml @@ -248,10 +248,104 @@ + + IOAccounting= + + + Turn on Block I/O accounting for this unit on unified + hierarchy. Takes a boolean argument. Note that turning on + block I/O accounting for one unit will also implicitly turn + it on for all units contained in the same slice and all for + its parent slices and the units contained therein. The + system default for this setting may be controlled with + DefaultIOAccounting= in + systemd-system.conf5. + + + + + IOWeight=weight + StartupIOWeight=weight + + + Set the default overall block I/O weight for the + executed processes on unified hierarchy. Takes a single + weight value (between 1 and 10000) to set the default block + I/O weight. This controls the io.weight + control group attribute, which defaults to 100. For details + about this control group attribute, see cgroup-v2.txt. + The available I/O bandwidth is split up among all units + within one slice relative to their block I/O weight. + + While StartupIOWeight= only applies + to the startup phase of the system, + IOWeight= applies to the later runtime of + the system, and if the former is not set also to the startup + phase. This allows prioritizing specific services at boot-up + differently than during runtime. + + Implies IOAccounting=true. + + + + + IODeviceWeight=device weight + + + Set the per-device overall block I/O weight for the + executed processes on unified hierarchy. Takes a + space-separated pair of a file path and a weight value to + specify the device specific weight value, between 1 and + 10000. (Example: "/dev/sda 1000"). The file path may be + specified as path to a block device node or as any other + file, in which case the backing block device of the file + system of the file is determined. This controls the + io.weight control group attribute, which + defaults to 100. Use this option multiple times to set + weights for multiple devices. For details about this control + group attribute, see cgroup-v2.txt. + + Implies IOAccounting=true. + + + + + IOReadBandwidthMax=device bytes + IOWriteBandwidthMax=device bytes + + + Set the per-device overall block I/O bandwidth maximum + limit for the executed processes on unified hierarchy. This + limit is not work-conserving and the executed processes are + not allowed to use more even if the device has idle + capacity. Takes a space-separated pair of a file path and a + bandwidth value (in bytes per second) to specify the device + specific bandwidth. The file path may be a path to a block + device node, or as any other file in which case the backing + block device of the file system of the file is used. If the + bandwidth is suffixed with K, M, G, or T, the specified + bandwidth is parsed as Kilobytes, Megabytes, Gigabytes, or + Terabytes, respectively, to the base of 1000. (Example: + "/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 5M"). This + controls the io.max control group + attributes. Use this option multiple times to set bandwidth + limits for multiple devices. For details about this control + group attribute, see cgroup-v2.txt. + + + Implies IOAccounting=true. + + + BlockIOAccounting= + Use IOAccounting on unified hierarchy. + Turn on Block I/O accounting for this unit. Takes a boolean argument. Note that turning on block I/O accounting for one unit will also implicitly turn it on for all units @@ -267,9 +361,12 @@ BlockIOWeight=weight StartupBlockIOWeight=weight - Set the default overall block I/O weight for - the executed processes. Takes a single weight value (between - 10 and 1000) to set the default block I/O weight. This controls + Use IOWeight and StartupIOWeight on unified + hierarchy. + + Set the default overall block I/O weight for the + executed processes. Takes a single weight value (between 10 + and 1000) to set the default block I/O weight. This controls the blkio.weight control group attribute, which defaults to 500. For details about this control group attribute, see BlockIODeviceWeight=device weight + Use IODeviceWeight on unified hierarchy. + Set the per-device overall block I/O weight for the executed processes. Takes a space-separated pair of a file path and a weight value to specify the device specific @@ -317,6 +416,9 @@ BlockIOWriteBandwidth=device bytes + Use IOReadBandwidthMax and IOWriteBandwidthMax on + unified hierarchy. + Set the per-device overall block I/O bandwidth limit for the executed processes. Takes a space-separated pair of a file path and a bandwidth value (in bytes per second) to -- cgit v1.2.3-54-g00ecf