From: Josef Bacik <jbacik@fb.com>
To: Wouter Verhelst <w@uter.be>
Cc: <axboe@fb.com>, <linux-block@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-team@fb.com>,
<nbd-general@lists.sourceforge.net>
Subject: Re: [Nbd] [PATCH][V3] nbd: add multi-connection support
Date: Thu, 29 Sep 2016 10:03:50 -0400 [thread overview]
Message-ID: <87908d95-0b7c-bc3f-f69d-94d006829daf@fb.com> (raw)
In-Reply-To: <20160929095204.mexr6wpypo3bl6mx@grep.be>
On 09/29/2016 05:52 AM, Wouter Verhelst wrote:
> Hi Josef,
>
> On Wed, Sep 28, 2016 at 04:01:32PM -0400, Josef Bacik wrote:
>> NBD can become contended on its single connection. We have to serialize all
>> writes and we can only process one read response at a time. Fix this by
>> allowing userspace to provide multiple connections to a single nbd device. This
>> coupled with block-mq drastically increases performance in multi-process cases.
>> Thanks,
>
> This reminds me: I've been pondering this for a while, and I think there
> is no way we can guarantee the correct ordering of FLUSH replies in the
> face of multiple connections, since a WRITE reply on one connection may
> arrive before a FLUSH reply on another which it does not cover, even if
> the server has no cache coherency issues otherwise.
>
> Having said that, there can certainly be cases where that is not a
> problem, and where performance considerations are more important than
> reliability guarantees; so once this patch lands in the kernel (and the
> necessary support patch lands in the userland utilities), I think I'll
> just update the documentation to mention the problems that might ensue,
> and be done with it.
>
> I can see only a few ways in which to potentially solve this problem:
> - Kernel-side nbd-client could send a FLUSH command over every channel,
> and only report successful completion once all replies have been
> received. This might negate some of the performance benefits, however.
> - Multiplexing commands over a single connection (perhaps an SCTP one,
> rather than TCP); this would require some effort though, as you said,
> and would probably complicate the protocol significantly.
>
So think of it like normal disks with multiple channels. We don't send flushes
down all the hwq's to make sure they are clear, we leave that decision up to the
application (usually a FS of course). So what we're doing here is no worse than
what every real disk on the planet does, our hw queues are just have a lot
longer transfer times and are more error prone ;). I definitely think
documenting the behavior is important so that people don't expect magic to
happen, and perhaps we could add a flag later that says send all the flushes
down all the connections for the paranoid, it should be relatively
straightforward to do. Thanks,
Josef
next prev parent reply other threads:[~2016-09-29 14:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 20:01 Josef Bacik
2016-09-29 9:52 ` [Nbd] " Wouter Verhelst
2016-09-29 14:03 ` Josef Bacik [this message]
2016-09-29 16:41 ` Wouter Verhelst
2016-09-29 16:59 ` Josef Bacik
2016-10-02 16:17 ` Alex Bligh
2016-10-03 1:47 ` Josef Bacik
2016-10-03 7:20 ` Christoph Hellwig
2016-10-03 7:51 ` Wouter Verhelst
2016-10-03 7:57 ` Christoph Hellwig
2016-10-03 11:34 ` Alex Bligh
2016-10-03 14:32 ` Josef Bacik
2016-10-03 14:46 ` Alex Bligh
2016-10-03 21:07 ` Wouter Verhelst
2016-10-04 9:35 ` Alex Bligh
2016-10-06 9:04 ` Wouter Verhelst
2016-10-06 9:41 ` Alex Bligh
2016-10-06 10:15 ` Wouter Verhelst
2016-10-06 11:04 ` Alex Bligh
2016-10-06 10:31 ` Christoph Hellwig
2016-10-06 13:09 ` Wouter Verhelst
2016-10-06 13:16 ` Christoph Hellwig
2016-10-06 13:55 ` Wouter Verhelst
2016-10-03 7:49 ` Wouter Verhelst
2016-10-11 9:00 ` Sagi Grimberg
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=87908d95-0b7c-bc3f-f69d-94d006829daf@fb.com \
--to=jbacik@fb.com \
--cc=axboe@fb.com \
--cc=kernel-team@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd-general@lists.sourceforge.net \
--cc=w@uter.be \
/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
all inboxes | Powered by JetHome®