All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tm@tao.ma>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: [RFC] block/throttle: Add IO throttled information in blkcg.
Date: Wed, 23 May 2012 10:21:31 +0800	[thread overview]
Message-ID: <4FBC49AB.1060702@tao.ma> (raw)
In-Reply-To: <20120522200859.GA10211@redhat.com>

On 05/23/2012 04:08 AM, Vivek Goyal wrote:
> On Tue, May 22, 2012 at 11:14:55PM +0800, Tao Ma wrote:
>> On 05/22/2012 11:06 PM, Vivek Goyal wrote:
>>> On Tue, May 22, 2012 at 10:44:11PM +0800, Tao Ma wrote:
>>>> Hi Vivek,
>>>> 	Thanks for the quick response.
>>>> On 05/22/2012 07:11 PM, Vivek Goyal wrote:
>>>>> On Tue, May 22, 2012 at 04:10:36PM +0800, Tao Ma wrote:
>>>>>> From: Tao Ma <boyu.mt@taobao.com>
>>>>>>
>>>>>> Currently, if the IO is throttled by io-throttle, the SA has no idea of
>>>>>> the situation and can't report it to the real application user about
>>>>>> that he/she has to do something. So this patch adds a new interface
>>>>>> named blkio.throttle.io_throttled which indicates how many IOs are
>>>>>> currently throttled.
>>>>>
>>>>> If the only purpose is to know whether IOs are being throttled, why
>>>>> not just scan for the rules and see if respective device has any
>>>>> throttling rules or not.
>>>> Sorry, but setting a throttling rules doesn't mean the IOs are
>>>> throttled, right? So scanning doesn't work here IMHO.
>>>
>>> It means IOs will be throttled if you cross a certain rate. But yes, it
>>> does not give any information that if at time T if there are any bios
>>> throttled in the queue or not.
>>>
>>>>>
>>>>> Even if you introduce this interface, you will end up scanning for
>>>>> throttled ios against that particular device. And if IO is not happening
>>>>> at that moment or if IO rate is not exceeding the rate limit, there
>>>>> might not be any throttled ios and one might get misled.
>>>> Oh, no actually in a *clound computing* environment, it is really
>>>> useful, not misled. So let me describe it in more detail. Our product
>>>> system will limit every instance to an approximate number at first, and
>>>> then watch out the IOs being throttled. If these numbers is high, it can:
>>>> 1) Shout loudly to the application programmer about the abuse if he
>>>> sends out too much IO requests.
>>>> 2) If it is not too much and some other instances are not active, adjust
>>>> the throttled ratio so that this instance can work much faster.
>>>
>>> Ok, so you want to use this more as "congestion" parameter which tells at
>>> a given moment how busy the queue is, or in this instance how many IOs
>>> are backlogged in a cgroup due to throttling limits.
>> yeah, with this information the daemon can adjust these limits
>> automatically.
> 
> I am hoping that this daemon will monitor the file for long periods and
> will not reach to bursty traffic from application.
> 
>>>
>>> I guess, it is not a bad idea to export this stat then. Will
>>> "blkio.throttle.queued" be a better name to reflect that how many bios
>>> are currently queued in throttling layer of request queue.
>> I have thought of this name at the very first time. But there is also
>> another one named "blkio.queued" which indicated the IOs being queued in
>> the scheduler. I don't want the user to be confused and that's the
>> reason I use "blkio.throttle.io_throttled".
> 
> Actually it is blkio.io_queued which shows number of requests queued in
> CFQ in that cgroup.
> 
> CFQ and throttling are two different policies and they have separate
> files in cgroup. Ideally blkio.io_queued should have been
> blkio.cfq.io_queued but initially it did not occur to me that I should
> qualify these files with policy name.
> 
> Later when throttling policy came along, then I qualified new files with
> policy name. blkio.throttle.*.
> 
> In summary, blkio.io_queued gives stats of io queued at CFQ level. So it
> makes sense to create blkio.throttle.io_queued which tells how many
> bios are currently throttled and queued in throttling layer in this
> request queue from this cgroup.
OK, I am fine with any name actually. ;) I will use it in the v2.

Thanks
Tao
> 
> Thanks
> Vivek


  reply	other threads:[~2012-05-23  2:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22  8:10 [RFC] block/throttle: Add IO throttled information in blkcg Tao Ma
2012-05-22 11:11 ` Vivek Goyal
2012-05-22 14:44   ` Tao Ma
2012-05-22 15:06     ` Vivek Goyal
2012-05-22 15:14       ` Tao Ma
2012-05-22 20:08         ` Vivek Goyal
2012-05-23  2:21           ` Tao Ma [this message]
2012-05-29  7:51   ` Tao Ma
2012-06-04 15:06     ` Vivek Goyal

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=4FBC49AB.1060702@tao.ma \
    --to=tm@tao.ma \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.