Subject: Re: RFC: Nagle latency tuning

From: Chris Snook <[email-masked]>
Date: Tue, 09 Sep 2008 02:28:37 -0400

Evgeniy Polyakov wrote:
> Hi.
> 
> On Tue, Sep 09, 2008 at 01:56:12AM -0400, Chris Snook ([email-masked]) wrote:
>> The easiest way to see the problem is to open a TCP socket to an echo 
>> daemon on loopback, make a bunch of small writes totaling less than your 
>> loopback MTU (accounting for overhead), and see how long it takes to get 
>> your echoes.  You can probably do this with netcat, though I haven't 
>> tried.  People don't expect loopback to have 40 ms latency when the box 
>> is lightly loaded, so they'd really like to tweak that down when it's 
>> hurting them.
> 
> Isn't Nagle without corking a very bad idea? Or you can not change the
> application?
> 

Yes, it is a bad idea.  We want to make the corking tunable, so people 
don't disable it completely to avoid these 40 ms latencies.  Also, we 
often can't change the application, so tuning this system-wide would be 
nice, and would be a lot less dangerous than turning on TCP_NODELAY 
system-wide the way people often do with solaris.

-- Chris