Linux Container Development
 help / color / mirror / Atom feed
From: Gui Jianfeng <guijianfeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH -mm 0/6] cgroup: block device i/o controller (v11)
Date: Mon, 10 Nov 2008 17:52:21 +0800	[thread overview]
Message-ID: <49180455.6060202@cn.fujitsu.com> (raw)
In-Reply-To: <4917F62A.20800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Andrea Righi wrote:
> On 2008-11-03 08:01, Gui Jianfeng wrote:
>> Hi Andrea,
>>
>> I'v tested io-throttle(v11), it seems io-throttle doesn't work well 
>> when a process writes(delay-write) a small file(<50M may be). it can't 
>> throttle the request process accurately.
>> I guess the following reason causes this problem.
>> The write-request process terminates too early to see all accounting
>> calculated in pdflush. So io-throttle can't throttle
>> enough time for that process. Am i right?
> 
> Hi Gui,
> 
> sorry for my late first of all. You're right in part. The fact is that
> with asynchronous IO (no O_DIRECT more exactly) the accounting is
> performed when the blocks are submitted to the IO subsystem (submit_bio)
> and the throttling is performed post-facto when the same process or the
> other processes in the same cgroup write additional pages mapped to the
> limited device (throttling is performed in
> balance_dirty_pages_ratelimited_nr).
> 
> Anyway, if the process did a single small write in memory the operation
> is not accounted until pdflush writes the data back to the block device.
> When pdflush (or the process itself) performs the writeback the
> operation is accounted and next reads/writes that come from the same
> cgroup can now be throttled according to the defined limits.
> 
> So, the accounting is not lost, this information is only used later to
> throttle the next operations that will cause IO requests. IO spikes in
> this way are not prevented. With an early version of io-throttle I did
> both throttling and accounting in balance_dirty_pages_ratelimited_nr
> (when pages are written to memory), this can prevent IO spikes, but only
> if dirty_ratio is set to small values.

  Hi, Andrea,

  Thanks for your detailed explanation, I'v got your point.
  I think it makes more sense if throttling can be fair among other tasks. ;-)

> 
> Hope this clarify,
> -Andrea
> 
> 
> 

-- 
Regards
Gui Jianfeng

  parent reply	other threads:[~2008-11-10  9:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1223373818-13687-1-git-send-email-righi.andrea@gmail.com>
     [not found] ` <2891419e0810140217l70f233bbr3b08760188458c35@mail.gmail.com>
     [not found]   ` <2891419e0810140217l70f233bbr3b08760188458c35-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-14  9:56     ` [PATCH -mm 0/6] cgroup: block device i/o controller (v11) Andrea Righi
     [not found]   ` <48F46CB6.3010904@gmail.com>
     [not found]     ` <48F46CB6.3010904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-10-15  6:13       ` Dong-Jae Kang
     [not found]     ` <2891419e0810142313p1aa16295ne2aa8ac3a87be491@mail.gmail.com>
     [not found]       ` <2891419e0810142313p1aa16295ne2aa8ac3a87be491-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-16  9:00         ` Andrea Righi
     [not found] ` <1223373818-13687-1-git-send-email-righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-10-14  9:17   ` Dong-Jae Kang
2008-11-03  7:01   ` Gui Jianfeng
     [not found]     ` <490EA1B4.9070600-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2008-11-10  8:51       ` Andrea Righi
     [not found]         ` <4917F62A.20800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-10  9:52           ` Gui Jianfeng [this message]
2008-10-07 10:03 Andrea Righi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49180455.6060202@cn.fujitsu.com \
    --to=guijianfeng-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox