RFC: Nagle latency tuning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christopher Snook
Date: Monday, September 8, 2008 - 2:56 pm

Hey folks --

We frequently get requests from customers for a tunable to disable Nagle 
system-wide, to be bug-for-bug compatible with Solaris.  We routinely reject 
these requests, as letting naive TCP apps accidentally flood the network is 
considered harmful.  Still, it would be very nice if we could reduce 
Nagle-induced latencies system-wide, if we could do so without disabling Nagle 
completely.

If you write a multi-threaded app that sends lots of small messages across TCP 
sockets, and you do not use TCP_NODELAY, you'll often see 40 ms latencies as the 
network stack waits for more senders to fill an MTU-sized packet before 
transmitting.  Even worse, these apps may work fine across the LAN with a 1500 
MTU and then counterintuitively perform much worse over loopback with a 16436 MTU.

To combat this, many apps set TCP_NODELAY, often without the abundance of 
caution that option should entail.  Other apps leave it alone, and suffer 
accordingly.

If we could simply lower this latency, without changing the fundamental behavior 
of the TCP stack, it would be a great benefit to many latency-sensitive apps, 
and discourage the unnecessary use of TCP_NODELAY.

I'm afraid I don't know the TCP stack intimately enough to understand what side 
effects this might have.  Can someone more familiar with the nagle 
implementations please enlighten me on how this could be done, or why it 
shouldn't be?

-- Chris
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RFC: Nagle latency tuning, Christopher Snook, (Mon Sep 8, 2:56 pm)
Re: RFC: Nagle latency tuning, Rick Jones, (Mon Sep 8, 3:39 pm)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 8, 3:55 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 8, 10:10 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 8, 10:17 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 8, 10:22 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 8, 10:56 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 8, 11:02 pm)
Re: RFC: Nagle latency tuning, Evgeniy Polyakov, (Mon Sep 8, 11:22 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 8, 11:28 pm)
Re: RFC: Nagle latency tuning, Mark Brown, (Tue Sep 9, 3:31 am)
Re: RFC: Nagle latency tuning, David Miller, (Tue Sep 9, 5:05 am)
Re: RFC: Nagle latency tuning, Mark Brown, (Tue Sep 9, 5:09 am)
Re: RFC: Nagle latency tuning, David Miller, (Tue Sep 9, 5:19 am)
Re: RFC: Nagle latency tuning, Arnaldo Carvalho de Melo, (Tue Sep 9, 6:00 am)
Re: RFC: Nagle latency tuning, Andi Kleen, (Tue Sep 9, 7:36 am)
Re: RFC: Nagle latency tuning, Rick Jones, (Tue Sep 9, 9:33 am)
Re: RFC: Nagle latency tuning, Chuck Lever, (Tue Sep 9, 9:54 am)
Re: RFC: Nagle latency tuning, Arnaldo Carvalho de Melo, (Tue Sep 9, 10:21 am)
Re: RFC: Nagle latency tuning, Rick Jones, (Tue Sep 9, 10:54 am)
Re: RFC: Nagle latency tuning, Chris Snook, (Tue Sep 9, 11:40 am)
Re: RFC: Nagle latency tuning, Andi Kleen, (Tue Sep 9, 12:07 pm)
Re: RFC: Nagle latency tuning, Arnaldo Carvalho de Melo, (Tue Sep 9, 12:21 pm)
Re: RFC: Nagle latency tuning, David Miller, (Tue Sep 9, 12:59 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Tue Sep 9, 1:25 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Wed Sep 10, 9:08 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 3:49 am)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 4:09 am)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 22, 1:30 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 22, 3:22 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 3:26 pm)
Re: RFC: Nagle latency tuning, Rick Jones, (Mon Sep 22, 3:47 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 22, 3:57 pm)
Re: RFC: Nagle latency tuning, Chris Snook, (Mon Sep 22, 4:00 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 4:13 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 4:21 pm)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 22, 4:24 pm)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 22, 5:14 pm)
Re: RFC: Nagle latency tuning, Rick Jones, (Mon Sep 22, 5:33 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 6:40 pm)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 22, 7:12 pm)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 22, 7:23 pm)
Re: RFC: Nagle latency tuning, David Miller, (Mon Sep 22, 7:28 pm)
Re: RFC: Nagle latency tuning, Andi Kleen, (Mon Sep 22, 7:41 pm)