cgroup: Add io.weight example.
This commit is contained in:
parent
f3e5c63f87
commit
ffe5c95e7e
@ -162,7 +162,7 @@ echo "$$" > cgroup.procs
|
||||
|
||||
== Controlling Input/Output usage
|
||||
|
||||
This control group will limit the write speed to 2
|
||||
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:controllers[]. IO limits are set per device. You need to
|
||||
specify the major and minor device numbers of the _device_ (not partition) you
|
||||
@ -174,12 +174,17 @@ want to limit (in my case it is “8:0” for `/dev/sda`). Run `lsblk` or `cat
|
||||
echo "+io" > cgroup.subtree_control
|
||||
mkdir testgroup
|
||||
cd testgroup
|
||||
echo "default 500" > io.weight
|
||||
echo "8:0 wbps=$((2 * 1024 * 1024)) rbps=max" > io.max
|
||||
echo "$$" > cgroup.procs
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
*io.max* limits bytes per second (_rbps/wbps_) and/or IO operations per
|
||||
second (_riops/wiops_).
|
||||
- *io.weight* specifies the relative amount of IO time the cgroup can use in
|
||||
relation to its siblings and has a range from 1 to 10,000. The priority can
|
||||
be overridden for individual devices with the major:minor syntax, like “8:0
|
||||
90”. The default is value is 100.
|
||||
- *io.max* limits bytes per second (_rbps/wbps_) and/or IO operations per second
|
||||
(_riops/wiops_).
|
||||
|
||||
Try running ``dd if=/dev/zero bs=1M count=100 of=test.img
|
||||
oflag=direct``footnote:[`oflag=direct` opens the file with the `O_DIRECT` flag,
|
||||
|
Loading…
x
Reference in New Issue
Block a user