cgroup blkio throttle does not work on root group

Asked by Neil on 2018-03-31

Doing test on xenial and trusty, seems cgroup blkio throttle does not work with root group on xenial, but subgroup works fine. Trusty both work fine.
Is there any throttle policy changed, or I get misunderstanding of anything?

ubuntu16.04(xenial)

root@i-x3mn8m8i:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 20G 0 disk
`-vda1 253:1 0 20G 0 part /
vdb 253:16 0 1G 0 disk [SWAP]
root@i-x3mn8m8i:~# dd if=/dev/zero of=test.img bs=4k oflag=direct
^C16246+0 records in
16246+0 records out
66543616 bytes (67 MB, 63 MiB) copied, 3.15081 s, 21.1 MB/s

root@i-x3mn8m8i:~# echo 253:0 1000 > /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device
root@i-x3mn8m8i:~# dd if=/dev/zero of=test.img bs=4k oflag=direct
^C26702+0 records in
26702+0 records out
109371392 bytes (109 MB, 104 MiB) copied, 5.2413 s, 20.9 MB/s

ubuntu14.04(trusty)

root@i-ulhx27oo:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 253:0 0 20G 0 disk
`-vda1 253:1 0 20G 0 part /
vdb 253:16 0 1G 0 disk [SWAP]

root@i-ulhx27oo:~# dd if=/dev/zero of=test.img bs=4k oflag=direct
^C27679+0 records in
27679+0 records out
113373184 bytes (113 MB) copied, 5.43766 s, 20.8 MB/s

root@i-ulhx27oo:~# echo 253:0 1000 > /sys/fs/cgroup/blkio/blkio.throttle.write_iops_device
root@i-ulhx27oo:~# dd if=/dev/zero of=test.img bs=4k oflag=direct
^C7553+0 records in
7553+0 records out
30937088 bytes (31 MB) copied, 7.60268 s, 4.1 MB/s

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Last query:
2018-03-31
Last reply:
2018-03-31

I suggest you report a bug

Neil (loyou) said : #2

bug(#1760375) reported for checking

Can you help with this problem?

Provide an answer of your own, or ask Neil for more information if necessary.

To post a message you must log in.