qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Thomas <nick@bytemark.co.uk>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/3] nbd: use TCP_NODELAY
Date: Mon, 15 Apr 2013 15:28:02 +0100	[thread overview]
Message-ID: <1366036082.2208.30.camel@eboracum.office.bytemark.co.uk> (raw)
In-Reply-To: <1366035288-15840-1-git-send-email-stefanha@redhat.com>

On Mon, 2013-04-15 at 16:14 +0200, Stefan Hajnoczi wrote:
> The nbd block driver should use TCP_NODELAY.  Nick Thomas <nick@bytemark.co.uk>
> measured a 40 millisecond latency added by the Naggle algorithm.
> 
> This series turns on TCP_NODELAY.  This requires that we use TCP_CORK to
> efficiently send NBD requests that contain a payload after the header.
> 
> Finally, fix a bug where we forget to unlock a mutex when sending fails.
> 
> Stefan Hajnoczi (3):
>   nbd: unlock mutex in nbd_co_send_request() error path
>   nbd: use TCP_CORK in nbd_co_send_request()
>   nbd: set TCP_NODELAY
> 
>  block/nbd.c | 25 +++++++++++++++++++------
>  1 file changed, 19 insertions(+), 6 deletions(-)
> 

Tested-by: Nick Thomas <nick@bytemark.co.uk>

Running "dd if=/dev/zero of=/dev/hda bs=4096 count=1" - latency is
reduced from ~40ms to ~0.2ms. The entire NBD write request ends up in a
single ethernet frame, where mtu supports it (verified with wireshark).

Thanks!

/Nick

  parent reply	other threads:[~2013-04-15 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 14:14 [Qemu-devel] [PATCH 0/3] nbd: use TCP_NODELAY Stefan Hajnoczi
2013-04-15 14:14 ` [Qemu-devel] [PATCH 1/3] nbd: unlock mutex in nbd_co_send_request() error path Stefan Hajnoczi
2013-04-15 14:14 ` [Qemu-devel] [PATCH 2/3] nbd: use TCP_CORK in nbd_co_send_request() Stefan Hajnoczi
2013-04-15 14:14 ` [Qemu-devel] [PATCH 3/3] nbd: set TCP_NODELAY Stefan Hajnoczi
2013-04-15 14:28 ` Nicholas Thomas [this message]
2013-04-15 14:33 ` [Qemu-devel] [PATCH 0/3] nbd: use TCP_NODELAY Paolo Bonzini

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=1366036082.2208.30.camel@eboracum.office.bytemark.co.uk \
    --to=nick@bytemark.co.uk \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).