netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: Nagle latency tuning
@ 2008-09-08 21:56 Christopher Snook
  2008-09-08 22:39 ` Rick Jones
  2008-09-08 22:55 ` Andi Kleen
  0 siblings, 2 replies; 44+ messages in thread
From: Christopher Snook @ 2008-09-08 21:56 UTC (permalink / raw)
  To: Netdev

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

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2008-09-23  2:37 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08 21:56 RFC: Nagle latency tuning Christopher Snook
2008-09-08 22:39 ` Rick Jones
2008-09-09  5:10   ` Chris Snook
2008-09-09  5:17     ` David Miller
2008-09-09  5:56       ` Chris Snook
2008-09-09  6:02         ` David Miller
2008-09-09 10:31           ` Mark Brown
2008-09-09 12:05             ` David Miller
2008-09-09 12:09               ` Mark Brown
2008-09-09 12:19                 ` David Miller
2008-09-09  6:22         ` Evgeniy Polyakov
2008-09-09  6:28           ` Chris Snook
2008-09-09 13:00           ` Arnaldo Carvalho de Melo
2008-09-09 14:36     ` Andi Kleen
2008-09-09 18:40       ` Chris Snook
2008-09-09 19:07         ` Andi Kleen
2008-09-09 19:21           ` Arnaldo Carvalho de Melo
2008-09-11  4:08           ` Chris Snook
2008-09-09 19:59         ` David Miller
2008-09-09 20:25           ` Chris Snook
2008-09-22 10:49           ` David Miller
2008-09-22 11:09             ` David Miller
2008-09-22 20:30               ` Andi Kleen
2008-09-22 22:22                 ` Chris Snook
2008-09-22 22:26                   ` David Miller
2008-09-22 23:00                     ` Chris Snook
2008-09-22 23:13                       ` David Miller
2008-09-22 23:24                         ` Andi Kleen
2008-09-22 23:21                           ` David Miller
2008-09-23  0:14                             ` Andi Kleen
2008-09-23  0:33                               ` Rick Jones
2008-09-23  2:12                                 ` Andi Kleen
2008-09-23  1:40                               ` David Miller
2008-09-23  2:23                                 ` Andi Kleen
2008-09-23  2:28                                   ` David Miller
2008-09-23  2:41                                     ` Andi Kleen
2008-09-22 22:47                   ` Rick Jones
2008-09-22 22:57                     ` Chris Snook
2008-09-09 16:33     ` Rick Jones
2008-09-09 16:54       ` Chuck Lever
2008-09-09 17:21         ` Arnaldo Carvalho de Melo
2008-09-09 17:54         ` Rick Jones
2008-09-08 22:55 ` Andi Kleen
2008-09-09  5:22   ` Chris Snook

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).