On Mon, Aug 22, 2011 at 08:54:29AM -0500, Dusty Hall wrote:
> * Sorry for the response time, had to drop my testing...
> 
> Wow, that worked.  It limits the previous dd command also.  Any explanation?

Applications write to page cache and later flusher threads submits those
writes. As current logic decides the cgroup of page based on submitter
thread, all the buffered writes are accounted to root group. So by
puttling limits on root group you are effectively throttling flusher
thread which indirectly throttles the original writer.

Thanks
Vivek

> 
> # echo "202:240 0" > blkio.throttle.write_bps_device
> # iostat -x 2 /dev/xvdp
> 
> <snip>
> Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
> avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
> xvdp              0.00     0.00    0.00  814.50     0.00 35838.00
> 88.00   143.17  175.39    0.00  175.39   1.23 100.00
> Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
> avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
> xvdp              0.00     0.00    0.00  601.00     0.00 26421.50
> 87.93   101.85  179.68    0.00  179.68   1.25  75.00
> </snip>
> 
> # echo "202:240 1048576" > blkio.throttle.write_bps_device
> # iostat -x 2 /dev/xvdp
> 
> <snip>
> Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
> avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
> xvdp              0.00     0.00    0.00   23.50     0.00  1034.00
> 88.00     0.00    0.00    0.00    0.00   0.00   0.00
> Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
> avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
> xvdp              0.00     0.00    0.00   23.00     0.00  1012.00
> 88.00     0.00    0.00    0.00    0.00   0.00   0.00
> </snip>
> 
> 
> Thanks again,
> 
> -=Dusty
> 
> 
> On Mon, Aug 8, 2011 at 12:09 PM, Vivek Goyal <vgo...@redhat.com> wrote:
> > On Mon, Aug 08, 2011 at 10:42:50AM -0500, Dusty Hall wrote:
> >> That worked, thanks!  What are my options for throttling data via cp?
> >> ie: cp /tmp/fourgigfile /mnt/fourgigfile
> >>
> >> FWIW, I'm trying to copy files from one filesystem to another without
> >> sacrificing system performance.  This maybe where I should be using
> >> blkio.weight but I'd like to be able to put a hard limit on the speed
> >> of the copy.
> >>
> >
> > You might want to put limit on root cgroup. Though its not a very good idea
> > as any system process/thread also doing IO will be blocked on that disk.
> > Still you can give it a try.
> >
> > Thanks
> > Vivek
> >
> >> Thanks again,
> >>
> >>
> >> -=Dusty
> >>
> >>
> >>
> >> On Mon, Aug 8, 2011 at 8:21 AM, Vivek Goyal <vgo...@redhat.com> wrote:
> >> > On Sun, Aug 07, 2011 at 11:39:33AM -0700, Dhaval Giani wrote:
> >> >> [Adding vgoyal to the cc]
> >> >
> >> > [..]
> >> >> > ------ process 31646 ------
> >> >> >
> >> >> > user@localhost$ dd if=/tmp/fourgigfile of=/mnt/fourgigfile bs=4k 
> >> >> > count=1000000
> >> >> > 1000000+0 records in
> >> >> > 1000000+0 records out
> >> >> > 4096000000 bytes (4.1 GB) copied, 58.6709 s, 69.8 MB/s
> >> >
> >> > Currently blkio throttle does not control the buffered writes. So try
> >> > above commnad with oflag=direct and it should help.
> >> >
> >> > Thanks
> >> > Vivek
> >> >
> >
> 
> 
> 
> -- 
> 
> 
> -=Dusty

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to