Subject: Re: RFC: Nagle latency tuning

From: Chris Snook <[email-masked]>
Date: Tue, 09 Sep 2008 14:40:00 -0400

Andi Kleen wrote:
> Chris Snook <[email-masked]> writes:
>> I'd like to know where the 40 ms magic number comes from. 
> 
> From TCP_ATO_MIN
> 
> #define TCP_ATO_MIN     ((unsigned)(HZ/25))
> 
>> That's the
>> one that really hurts, and if we could lower that without doing
>> horrible things elsewhere in the stack, 
> 
> You can lower it (with likely some bad side effects), but I don't think it 
> would make these apps very happy in the end because they likely want
> no delay at all.
> 
> -Andi

These apps have a love/hate relationship with TCP.  They'll probably love SCTP 5 
years from now, but it's not mature enough for them yet.  They do want to 
minimize all latencies, and many of the apps explicitly set TCP_NODELAY.  The 
goal here is to improve latencies on the supporting apps that aren't quite as 
carefully optimized as the main message daemons themselves.  If we can give them 
a knob that bounds their worst-case latency to 2-3 times their average latency, 
without risking network floods that won't show up in testing, they'll be much 
happier.

-- Chris