[lxc-users] disk IO limit

Divya Vyas dvyas at mvista.com
Thu Jul 17 08:41:08 UTC 2014


Hi Fajar,

Thanks for your reply . Can you please help me how can I test the assigned
bandwidth?


On Thu, Jul 17, 2014 at 1:54 PM, Fajar A. Nugraha <list at fajar.net> wrote:

> 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
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140717/385ed415/attachment.html>


More information about the lxc-users mailing list