We're running Docker containers with devicemapper on CentOS 7 (3.10.0-514.10.2.el7.x86_64)
.
For some containers we can easily throttle reads through blkio.throttle.read_bps_device
by specifying the parent block device, but for some containers it just doesn't work.
Here's our lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 32G 0 disk
└─sda1 8:1 0 32G 0 part /
sdb 8:16 0 100G 0 disk
├─data-docker_thin_tmeta 253:0 0 512M 0 lvm
│ └─data-docker_thin 253:2 0 90G 0 lvm
│ └─docker-8:1-151197496-c619...6ed 253:4 0 10G 0 dm
├─data-docker_thin_tdata 253:1 0 90G 0 lvm
│ └─data-docker_thin 253:2 0 90G 0 lvm
│ └─docker-8:1-151197496-c619...6ed 253:4 0 10G 0 dm
└─data-data 253:3 0 9G 0 lvm /data
When we specify in a cgroup the following, it properly throttles the reads for some containers:
echo "8:16 1000000" > blkio.throttle.read_bps_device
But for other containers, we need to specify the exact device such as:
echo "253:4 1000000" > blkio.throttle.read_bps_device
Any ideas what may be the reason why the throttling with parent device at 8:16
does not work sometimes?
0 Answers