From: Shaohua Li <shli@kernel.org>
To: Khazhismel Kumykov <khazhy@google.com>
Cc: axobe@kernel.dk, shli@fb.com, vgoyal@redhat.com, tj@kernel.org,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [RFC PATCH] blk-throttle: add burst allowance.
Date: Fri, 17 Nov 2017 11:26:14 -0800 [thread overview]
Message-ID: <20171117192614.4knf72v26iir6tpi@kernel.org> (raw)
In-Reply-To: <CACGdZY+OdN-yfTGFgd1qmXBn+z3OkKMX3FeCnwSdYVHj7HdQyw@mail.gmail.com>
On Thu, Nov 16, 2017 at 08:25:58PM -0800, Khazhismel Kumykov wrote:
> On Thu, Nov 16, 2017 at 8:50 AM, Shaohua Li <shli@kernel.org> wrote:
> > On Tue, Nov 14, 2017 at 03:10:22PM -0800, Khazhismel Kumykov wrote:
> >> Allows configuration additional bytes or ios before a throttle is
> >> triggered.
> >>
> >> This allows implementation of a bucket style rate-limit/throttle on a
> >> block device. Previously, bursting to a device was limited to allowance
> >> granted in a single throtl_slice (similar to a bucket with limit N and
> >> refill rate N/slice).
> >>
> >> Additional parameters bytes/io_burst_conf defined for tg, which define a
> >> number of bytes/ios that must be depleted before throttling happens. A
> >> tg that does not deplete this allowance functions as though it has no
> >> configured limits. tgs earn additional allowance at rate defined by
> >> bps/iops for the tg. Once a tg has *_disp > *_burst_conf, throttling
> >> kicks in. If a tg is idle for a while, it will again have some burst
> >> allowance before it gets throttled again.
> >>
> >> slice_end for a tg is extended until io_disp/byte_disp would fall to 0,
> >> when all "used" burst allowance would be earned back. trim_slice still
> >> does progress slice_start as before and decrements *_disp as before, and
> >> tgs continue to get bytes/ios in throtl_slice intervals.
> >
> > Can you describe why we need this? It would be great if you can describe the
> > usage model and an example. Does this work for io.low/io.max or both?
> >
> > Thanks,
> > Shaohua
> >
>
> Use case that brought this up was configuring limits for a remote
> shared device. Bursting beyond io.max is desired but only for so much
> before the limit kicks in, afterwards with sustained usage throughput
> is capped. (This proactively avoids remote-side limits). In that case
> one would configure in a root container io.max + io.burst, and
> configure low/other limits on descendants sharing the resource on the
> same node.
>
> With this patch, so long as tg has not dispatched more than the burst,
> no limit is applied at all by that tg, including limit imposed by
> io.low in tg_iops_limit, etc.
I'd appreciate if you can give more details about the 'why'. 'configuring
limits for a remote shared device' doesn't justify the change.
next prev parent reply other threads:[~2017-11-17 19:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 23:10 [RFC PATCH] blk-throttle: add burst allowance Khazhismel Kumykov
2017-11-14 23:22 ` Khazhismel Kumykov
2017-11-16 16:50 ` Shaohua Li
2017-11-17 4:25 ` Khazhismel Kumykov
2017-11-17 19:26 ` Shaohua Li [this message]
2017-11-21 4:36 ` Khazhismel Kumykov
2017-12-07 0:29 ` Khazhismel Kumykov
2017-12-07 0:41 ` Khazhismel Kumykov
2017-12-18 18:16 ` Khazhismel Kumykov
2017-12-18 18:29 ` Vivek Goyal
2017-12-18 20:39 ` Khazhismel Kumykov
2017-12-18 21:01 ` Vivek Goyal
2017-12-18 22:22 ` Khazhismel Kumykov
2017-12-07 19:43 ` Vivek Goyal
-- strict thread matches above, loose matches on Subject: below --
2017-10-26 23:54 Khazhismel Kumykov
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=20171117192614.4knf72v26iir6tpi@kernel.org \
--to=shli@kernel.org \
--cc=axobe@kernel.dk \
--cc=khazhy@google.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shli@fb.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox