sysbox icon indicating copy to clipboard operation
sysbox copied to clipboard

Limit IOPS with --device-write-bps

Open dushasokol-tasks opened this issue 3 years ago • 1 comments

Hello. I am using Sysbox 0.5.2 with Docker 20.10.12.

I am trying to limit iops with command, my default runtime set as sysbox-runc.

First I run docker run -it --rm --device-write-bps /dev/vda:10mb ubuntu /bin/bash.

Then I run a command in the container:

time dd if=/dev/zero of=test.out bs=1M count=1024 oflag=direct
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 14.7389 s, 72.9 MB/s

real    0m14.740s
user    0m0.015s
sys     0m0.281s

Looks like it didn't get my instructions for limiting I/O.

Can I restrict i/o with sysbox?

dushasokol-tasks avatar Nov 03 '22 10:11 dushasokol-tasks

Hi @dushasokol-tasks, sincere apologies for the super belated reply.

Sysbox does honor container cgroup limits, so unless I am missing something, it should have honored the --device-write-bps though it's not something we have tested to be honest (i.e., it's a hole in our tests).

Does the above command behave as expected with Docker's default runtime (i.e., with the OCI runc)?

ctalledo avatar Mar 29 '23 06:03 ctalledo