From: Daniel Phillips <phillips@phunq.net>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: Distributed storage.
Date: Mon, 13 Aug 2007 16:27:42 -0700 [thread overview]
Message-ID: <200708131627.42859.phillips@phunq.net> (raw)
In-Reply-To: <20070813091235.GI23758@kernel.dk>
On Monday 13 August 2007 02:12, Jens Axboe wrote:
> > It is a system wide problem. Every block device needs throttling,
> > otherwise queues expand without limit. Currently, block devices
> > that use the standard request library get a slipshod form of
> > throttling for free in the form of limiting in-flight request
> > structs. Because the amount of IO carried by a single request can
> > vary by two orders of magnitude, the system behavior of this
> > approach is far from predictable.
>
> Is it? Consider just 10 standard sata disks. The next kernel revision
> will have sg chaining support, so that allows 32MiB per request. Even
> if we disregard reads (not so interesting in this discussion) and
> just look at potentially pinned dirty data in a single queue, that
> number comes to 4GiB PER disk. Or 40GiB for 10 disks. Auch.
>
> So I still think that this throttling needs to happen elsewhere, you
> cannot rely the block layer throttling globally or for a single
> device. It just doesn't make sense.
You are right, so long as the unit of throttle accounting remains one
request. This is not what we do in ddsnap. Instead we inc/dec the
throttle counter by the number of bvecs in each bio, which produces a
nice steady data flow to the disk under a wide variety of loads, and
provides the memory resource bound we require.
One throttle count per bvec will not be the right throttling metric for
every driver. To customize this accounting metric for a given driver
we already have the backing_dev_info structure, which provides
per-device-instance accounting functions and instance data. Perfect!
This allows us to factor the throttling mechanism out of the driver, so
the only thing the driver has to do is define the throttle accounting
if it needs a custom one.
We can avoid affecting the traditional behavior quite easily, for
example if backing_dev_info->throttle_fn (new method) is null then
either not throttle at all (and rely on the struct request in-flight
limit) or we can move the in-flight request throttling logic into core
as the default throttling method, simplifying the request library and
not changing its behavior.
> > These deadlocks are first and foremost, block layer deficiencies.
> > Even the network becomes part of the problem only because it lies
> > in the block IO path.
>
> The block layer has NEVER guaranteed throttling, so it can - by
> definition - not be a block layer deficiency.
The block layer has always been deficient by not providing accurate
throttling, or any throttling at all for some devices. We have
practical proof that this causes deadlock and a good theoretical basis
for describing exactly how it happens.
To be sure, vm and net are co-conspirators, however the block layer
really is the main actor in this little drama.
Regards,
Daniel
next prev parent reply other threads:[~2007-08-13 23:27 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 17:13 Distributed storage Evgeniy Polyakov
2007-08-02 21:08 ` Daniel Phillips
2007-08-03 10:26 ` Evgeniy Polyakov
2007-08-03 10:57 ` Evgeniy Polyakov
2007-08-03 12:27 ` Peter Zijlstra
2007-08-03 13:49 ` Evgeniy Polyakov
2007-08-03 14:53 ` Peter Zijlstra
2007-08-03 19:48 ` Daniel Phillips
2007-08-03 19:41 ` Daniel Phillips
2007-08-04 1:19 ` Daniel Phillips
2007-08-04 16:37 ` Evgeniy Polyakov
2007-08-05 8:04 ` Daniel Phillips
2007-08-05 15:08 ` Evgeniy Polyakov
2007-08-05 21:23 ` Daniel Phillips
2007-08-06 8:25 ` Evgeniy Polyakov
2007-08-07 12:05 ` Jens Axboe
2007-08-07 18:24 ` Daniel Phillips
2007-08-07 20:55 ` Jens Axboe
2007-08-08 9:54 ` Block device throttling [Re: Distributed storage.] Evgeniy Polyakov
2007-08-08 10:17 ` [1/1] " Evgeniy Polyakov
2007-08-08 13:28 ` Evgeniy Polyakov
2007-08-12 23:16 ` Daniel Phillips
2007-08-13 8:18 ` Evgeniy Polyakov
2007-08-27 21:57 ` Daniel Phillips
2007-08-13 5:22 ` Daniel Phillips
2007-08-13 5:36 ` Daniel Phillips
2007-08-13 6:44 ` Daniel Phillips
2007-08-13 8:14 ` Evgeniy Polyakov
2007-08-13 11:04 ` Daniel Phillips
2007-08-13 12:04 ` Evgeniy Polyakov
2007-08-13 12:18 ` Daniel Phillips
2007-08-13 12:24 ` Evgeniy Polyakov
2007-08-13 8:23 ` Evgeniy Polyakov
2007-08-13 11:18 ` Daniel Phillips
2007-08-13 12:18 ` Evgeniy Polyakov
2007-08-13 13:04 ` Daniel Phillips
2007-08-14 8:46 ` Evgeniy Polyakov
2007-08-14 11:13 ` Daniel Phillips
2007-08-14 11:30 ` Evgeniy Polyakov
2007-08-14 11:35 ` Daniel Phillips
2007-08-14 11:50 ` Evgeniy Polyakov
2007-08-14 12:32 ` Daniel Phillips
2007-08-14 12:46 ` Evgeniy Polyakov
2007-08-14 12:54 ` Daniel Phillips
2007-08-12 23:36 ` Distributed storage Daniel Phillips
2007-08-13 7:28 ` Jens Axboe
2007-08-13 7:45 ` Jens Axboe
2007-08-13 9:08 ` Daniel Phillips
2007-08-13 9:13 ` Jens Axboe
2007-08-13 9:55 ` Daniel Phillips
2007-08-13 10:06 ` Jens Axboe
2007-08-13 10:15 ` Daniel Phillips
2007-08-13 10:22 ` Jens Axboe
2007-08-13 10:32 ` Daniel Phillips
2007-08-13 9:18 ` Evgeniy Polyakov
2007-08-13 10:12 ` Daniel Phillips
2007-08-13 11:03 ` Evgeniy Polyakov
2007-08-13 11:45 ` Daniel Phillips
2007-08-13 8:59 ` Daniel Phillips
2007-08-13 9:12 ` Jens Axboe
2007-08-13 23:27 ` Daniel Phillips [this message]
2007-08-03 4:09 ` Mike Snitzer
2007-08-03 10:42 ` Evgeniy Polyakov
2007-08-04 0:49 ` Daniel Phillips
2007-08-03 5:04 ` Manu Abraham
2007-08-03 10:44 ` Evgeniy Polyakov
2007-08-04 2:51 ` Dave Dillow
2007-08-04 3:44 ` Manu Abraham
2007-08-04 17:03 ` Evgeniy Polyakov
2007-08-04 0:41 ` Daniel Phillips
2007-08-04 16:44 ` Evgeniy Polyakov
2007-08-05 8:06 ` Daniel Phillips
2007-08-05 15:01 ` Evgeniy Polyakov
2007-08-05 21:35 ` Daniel Phillips
2007-08-06 8:28 ` Evgeniy Polyakov
[not found] ` <200708281027.59528.phillips@phunq.net>
[not found] ` <20070828175403.GA28440@2ka.mipt.ru>
[not found] ` <200708281408.06618.phillips@phunq.net>
2007-08-29 8:53 ` [1/1] Block device throttling [Re: Distributed storage.] Evgeniy Polyakov
2007-08-30 23:20 ` Daniel Phillips
2007-08-31 17:33 ` Evgeniy Polyakov
2007-08-31 21:41 ` Alasdair G Kergon
2007-09-02 4:42 ` Daniel Phillips
-- strict thread matches above, loose matches on Subject: below --
2008-08-27 16:07 Distributed STorage Evgeniy Polyakov
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=200708131627.42859.phillips@phunq.net \
--to=phillips@phunq.net \
--cc=jens.axboe@oracle.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).