[lxc-users] disk IO limit

Fajar A. Nugraha list at fajar.net
Thu Jul 17 08:24:49 UTC 2014


On Thu, Jul 17, 2014 at 3:18 PM, Divya Vyas <dvyas at mvista.com> wrote:

> Hi ,
>
> I am using two containers on top of disk /dev/sda  and I want to limit a
> disk IO write speed to 1 mb/sec of one of the containers.
>
> I gave this command ->
>  echo "8:0 1048576" >
> /sys/fs/cgroup/blkio//lxc/vm5/blkio.throttle.write_bps_device
> But not getting the desired output.
>
> dd if=/dev/zero of=/dev/sda bs=512 count=1000
> 1000+0 records in
> 1000+0 records out
> 512000 bytes (512 kB) copied, 0.00180087 s, 284 MB/s
>
> Does anyone tried limiting the disk IO of only one container?
>
>

Short version: it won't work the way you want to. dd is async by default.

http://www.mjmwired.net/kernel/Documentation/cgroups/blkio-controller.txt ,
look at the end.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140717/505d25da/attachment.html>


More information about the lxc-users mailing list