thank you very much.  I really get it<br><br><div class="gmail_quote">2011/12/14 Zhu Yanhai <span dir="ltr"><<a href="mailto:zhu.yanhai@gmail.com">zhu.yanhai@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
在 2011年12月14日 下午5:30,陈竞 <<a href="mailto:cj.magina@gmail.com">cj.magina@gmail.com</a>> 写道:<br>
<div class="im">> i got the problem, my script is wrong, it should drop the cache, or it will<br>
> read data from cache,<br>
>  the script is :<br>
> sync<br>
> echo 3 > /proc/sys/vm/drop_caches<br>
> dd if=/tmp/file1 of=/dev/null<br>
><br>
><br>
> size of file1 is 400M, and i get new test result:<br>
> A: blkio.weight=100    cost 11.12s   speed is 37.5MB/s<br>
> B: blkio.weight=1000    cost 6.4s   speed is 65.7MB/s<br>
><br>
> so the blkio.weight has some effect, bu the result is not as good as 1:10<br>
<br>
</div>No, it is good.<br>
Blkio controller doesn't reserve bandwith for any groups, so what<br>
happened in your test is Group B finished before Group A, and after<br>
that Group A was able to occupy all bandwith, which made it much<br>
faster.<br>
So if the size of input files are the same, then the expect run time is:<br>
For Group B: Runtime A = size / 10B<br>
For Group A: Runtiem B = size / 10B + 0.9 * size / 11B<br>
Then Runtime A / Runtime B = 0.55<br>
<br>
In your test, 6.4 / 11.12 = 0.5755, so it works well.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Thanks,<br>
Zhu Yanhai<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
><br>
><br>
> 2011/12/14 Zhu Yanhai <<a href="mailto:zhu.yanhai@gmail.com">zhu.yanhai@gmail.com</a>><br>
>><br>
>> And neither slice_idle nor group_idle is zero? Did you change any<br>
>> default parameters for CFQ?<br>
>><br>
>> -zyh<br>
>><br>
>> 在 2011年12月14日 下午4:55,陈竞 <<a href="mailto:cj.magina@gmail.com">cj.magina@gmail.com</a>> 写道:<br>
>> > my io scheduler is CFQ.... So the result is weird<br>
>> ><br>
>> > 在 2011年12月14日 下午4:12,陈竞 <<a href="mailto:cj.magina@gmail.com">cj.magina@gmail.com</a>>写道:<br>
>> ><br>
>> >> Hi, i'm using lxc in my project, i want to control disk io speed, so i<br>
>> >> use<br>
>> >> blkio.weight. I test it, but the result is confusing.<br>
>> >> I create two container A and B:<br>
>> >> A: blkio.weight = 100            B : blkio.weight=1000<br>
>> >><br>
>> >> the running process in A and B are the same, which is bash script :<br>
>> >> dd if=/tmp/xxx of=/dev/null<br>
>> >> the size of xxx is 400Mb<br>
>> >><br>
>> >> I suppose that A would be slower than B, since its weight is small,<br>
>> >> while<br>
>> >> the test turns out that B run as fast as A, they are in same speed.<br>
>> >> Can any help me figure it out ?<br>
>> >> PS: my kernel is 2.6.32, and lxc is 0.7.5<br>
>> >> --<br>
>> >> 陈竞,中科院计算技术研究所,高性能计算机中心<br>
>> >> Jing Chen <a href="http://HPCC.ICT.AC" target="_blank">HPCC.ICT.AC</a> China<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > 陈竞,中科院计算技术研究所,高性能计算机中心<br>
>> > Jing Chen <a href="http://HPCC.ICT.AC" target="_blank">HPCC.ICT.AC</a> China<br>
>> ><br>
>> ><br>
>> > ------------------------------------------------------------------------------<br>
>> > Cloud Computing - Latest Buzzword or a Glimpse of the Future?<br>
>> > This paper surveys cloud computing today: What are the benefits?<br>
>> > Why are businesses embracing it? What are its payoffs and pitfalls?<br>
>> > <a href="http://www.accelacomm.com/jaw/sdnl/114/51425149/" target="_blank">http://www.accelacomm.com/jaw/sdnl/114/51425149/</a><br>
>> > _______________________________________________<br>
>> > Lxc-users mailing list<br>
>> > <a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
>> > <a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
>> ><br>
><br>
><br>
><br>
><br>
> --<br>
> 陈竞,中科院计算技术研究所,高性能计算机中心<br>
> Jing Chen <a href="http://HPCC.ICT.AC" target="_blank">HPCC.ICT.AC</a> China<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>陈竞,中科院计算技术研究所,高性能计算机中心<br>Jing Chen <a href="http://HPCC.ICT.AC">HPCC.ICT.AC</a> China<br>