On Mon, 2013-04-15 at 16:14 +0200, Stefan Hajnoczi wrote: > The nbd block driver should use TCP_NODELAY. Nick Thomas > <n...@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 <n...@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