cgroup: Add note about IO distribution availability.
This commit is contained in:
parent
0be2de3cf8
commit
60ac230ca7
|
@ -23,6 +23,7 @@ toc: true
|
|||
:url-nice: https://manpages.debian.org/buster/coreutils/nice.1.en.html
|
||||
:url-htop: https://htop.dev/
|
||||
:url-ionice: https://manpages.debian.org/buster/util-linux/ionice.1.en.html
|
||||
:url-linux-git: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
||||
|
||||
We have Control Group v2 since 2016 but I had trouble finding good documentation
|
||||
on how to use it. Most tutorials and blog posts only cover v1 or are specific to
|
||||
|
@ -177,7 +178,7 @@ echo "$$" > cgroup.procs
|
|||
|
||||
This control group will increase the IO priority and limit the write speed to 2
|
||||
pass:[<abbr title="Mebibyte, 1024 Kibibyte">MiB</abbr>] a second using the io
|
||||
controllerfootnote:[link:{url-kernel-doc}#io[Kernel documentation on Control
|
||||
controllerfootnote:io[link:{url-kernel-doc}#io[Kernel documentation on Control
|
||||
Group v2, section Controllers → IO]]. IO limits are set per device. You need to
|
||||
specify the major and minor device numbers of the _device_ (not partition) you
|
||||
want to limit (in my case it is “8:0” for `/dev/sda`). Run `lsblk` or `cat
|
||||
|
@ -208,8 +209,14 @@ bypassing caches.]. You will see that the speed is around 2 MiB a second.
|
|||
Kernel 5.14 introduced
|
||||
**blkio.prio.class**footnote:[link:{url-kernel-doc-14}#io-priority[Kernel
|
||||
documentation on Control Group v2, section “IO Priority”]] that controls the IO
|
||||
priority. It seems to work like link:{url-ionice}[ionice]. I could not test it
|
||||
yet, since I run kernel 5.10.
|
||||
priority. It seems to work similar to link:{url-ionice}[ionice].
|
||||
|
||||
[IMPORTANT]
|
||||
Weight based distribution (*io.weight*) is available only if cfq-iosched is in
|
||||
use and absolute bandwidth or IOPS limit distribution (*io.max*) is not
|
||||
available for blk-mq devices.footnote:io[] The CFQ scheduler was removed in
|
||||
kernel 5.0.footnote:[link:{url-linux-git}/commit/?id=f382fb0[git commit: “block:
|
||||
remove legacy IO schedulers”]]
|
||||
|
||||
== Controlling process numbers
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user