[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/3] nbd: use TCP_NODELAY
From: |
Nicholas Thomas |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] nbd: use TCP_NODELAY |
Date: |
Mon, 15 Apr 2013 15:28:02 +0100 |
On Mon, 2013-04-15 at 16:14 +0200, Stefan Hajnoczi wrote:
> The nbd block driver should use TCP_NODELAY. Nick Thomas <address@hidden>
> 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 <address@hidden>
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