All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
	Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v2 4/4] nbd: Enable multi-conn using round-robin
Date: Mon, 28 Apr 2025 20:27:54 +0100	[thread overview]
Message-ID: <20250428192754.GF1450@redhat.com> (raw)
In-Reply-To: <20250428185246.492388-10-eblake@redhat.com>

On Mon, Apr 28, 2025 at 01:46:47PM -0500, Eric Blake wrote:
[...]

This all looks similar to when I posted it before.  However I noted a
couple of problems ...

> (XXX) The strategy here is very naive.  Firstly if you were going to 
> open them, you'd probably want to open them in parallel.  Secondly it
> would make sense to delay opening until multiple parallel requests are
> seen (perhaps above some threshold), so that simple or shortlived NBD
> operations do not require multiple connections to be made.

> (XXX) This uses a naive round-robin approach which could be improved.
> For example we could look at how many requests are in flight and
> assign operations to the connections with fewest.  Or we could try to
> estimate (based on size of requests outstanding) the load on each
> connection.  But this implementation doesn't do any of that.

Plus there was a third rather more fundamental problem that apparently
I didn't write about.  That is that connections were serialised on a
single thread (called from many coroutines).  This bottleneck meant
that there wasn't very much advantage to multi-conn, compared to what
we get in libnbd / nbdcopy.

Are these fixed / planned to be fixed, especially the third?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top



  reply	other threads:[~2025-04-28 19:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 18:46 [RFC PATCH v2 0/4] Revival of patches to implement NBD client multi-conn Eric Blake
2025-04-28 18:46 ` [PATCH v2 1/4] nbd: Add multi-conn option Eric Blake
2025-04-29  5:49   ` Markus Armbruster
2025-04-29  9:14     ` Richard W.M. Jones
2025-04-29 11:01       ` Markus Armbruster
2025-04-29 11:19         ` Richard W.M. Jones
2025-04-29 11:31           ` Markus Armbruster
2025-05-27 22:01             ` Eric Blake
2025-05-28  6:10               ` Markus Armbruster
2025-05-22 17:38   ` Andrey Drobyshev
2025-05-22 18:44     ` Eric Blake
2025-05-23 11:03       ` Andrey Drobyshev
2025-05-23 12:59         ` Eric Blake
2025-04-28 18:46 ` [PATCH v2 2/4] nbd: Split out block device state from underlying NBD connections Eric Blake
2025-04-28 18:46 ` [PATCH v2 3/4] nbd: Open multiple NBD connections if multi-conn is set Eric Blake
2025-04-28 18:46 ` [PATCH v2 4/4] nbd: Enable multi-conn using round-robin Eric Blake
2025-04-28 19:27   ` Richard W.M. Jones [this message]
2025-04-28 21:32     ` Eric Blake
2025-05-22 17:37   ` Andrey Drobyshev
2025-05-22 18:45     ` Eric Blake
2025-04-29  8:41 ` [RFC PATCH v2 0/4] Revival of patches to implement NBD client multi-conn Daniel P. Berrangé
2025-04-29 12:03 ` Denis V. Lunev

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=20250428192754.GF1450@redhat.com \
    --to=rjones@redhat.com \
    --cc=eblake@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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.