Ok, I think I understand... loosely :).

On Mon, Aug 22, 2011 at 10:54 AM, Vivek Goyal <vgo...@redhat.com> wrote:
> On Mon, Aug 22, 2011 at 10:30:42AM -0500, Dusty Hall wrote:
>> Thanks for the explanation.  So, I came up with this thought: limit
>> the root cgroup to 1Mb to catch and hold the process until it gets
>> classified.  Then, after it is classified release root cgroup.  It
>> didn't work.  Any ideas or is this not going to work?
>
> I think you are missing the point that in most of the cases a dirtier
> writes the page into page cache and then later flusher thread flushes
> that page and sends it to block device for writting.
>
> So I am not sure what do you mean by "limit the root cgroup to 1Mb to catch
> and hold the process until it gets classified".
>
> Its not about any delay as such. Due to this extra layer of cache, we lose
> the context information by the time IO reaches the device.
>
> Thanks
> Vivek
>>
>> Thanks,
>>
>> -=Dusty
>>
>> On Mon, Aug 22, 2011 at 9:02 AM, Vivek Goyal <vgo...@redhat.com> wrote:
>> > 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
>> >
>>
>>
>>
>> --
>>
>>
>> -=Dusty
>



-- 


-=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