<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 17, 2014 at 3:18 PM, Divya Vyas <span dir="ltr"><<a href="mailto:dvyas@mvista.com" target="_blank">dvyas@mvista.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Hi ,<br><br></div>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. <br><br></div>I gave this command -> <br>


 echo "8:0 1048576" > /sys/fs/cgroup/blkio//lxc/vm5/blkio.throttle.write_bps_device <br></div>But not getting the desired output. <br><div><div><br>dd if=/dev/zero of=/dev/sda bs=512 count=1000      <br>1000+0 records in<br>


1000+0 records out<br>512000 bytes (512 kB) copied, 0.00180087 s, 284 MB/s<br><br></div><div>Does anyone tried limiting the disk IO of only one container?<br></div></div></div>
<br></blockquote><div><br></div><div><br></div><div>Short version: it won't work the way you want to. dd is async by default.</div><div><br></div><div><a href="http://www.mjmwired.net/kernel/Documentation/cgroups/blkio-controller.txt">http://www.mjmwired.net/kernel/Documentation/cgroups/blkio-controller.txt</a> , look at the end.<br>
</div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>