1

I used following command to test if the IOPS and Disk read/write limitations are being applied or not, but they are not. as soon as i run command, the disk uses 100% of IO and bandwidth. thought, i tried chancing the disk, i am not sure which disk i should use as i have xvda, xvdf, and dm0-dm8.

docker run --rm --device-read-bps=/dev/dm-0:1000 --device-write-bps=/dev/dm-0:1000 --device-read-iops=/dev/xvdf:20 --device-write-iops=/dev/xvdf:20 nginx bash -c "time dd if=/dev/zero of=testdocker bs=512k count=1000 oflag=dsync"

What could be reason that its not working? OS is ubuntu and docker version is: Docker version 1.13.0, build 49bf474

With slightly modified command, i gave it direct path where to write test file, but now it gets stuck and does nothing, just hangs there

docker run --rm -v "/dc:/dc" --device-read-bps=/dev/xvda:1m --device-write-bps=/dev/xvda:1m --device-read-iops=/dev/xvda:100 --device-write-iops=/dev/xvda:100 nginx bash -c "time dd if=/dev/zero of=/dc/testdocker bs=512 count=1000 oflag=dsync"

After this command, the IOWAIT become 100% and docker contains just Hangs, does nothing. i cannot even stop it or even do anything to it.

2

Control Groups v1 cannot limit buffered IO which is the vast majority of IO on a system.

Control Groups V2 can. If you are using a v2 compatible kernel (and if docker supports it, as I dont know if it does) you should use that instead.

| improve this answer | |
  • Can you please further explain about control groups? how can i check which control group i am using? – Farhan Mar 20 '17 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.