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