sftp performance problem, cured by TCP_NODELAY

Chris Rapier rapier at psc.edu
Mon Jan 30 05:56:11 EST 2006

Miklos Szeredi wrote:

>> It would be nice to get a better mechanism in place because not
>> having Nagle is inherently limiting. Being that ssh is multiplexed
>> anyway you could probably just re-implement something like it on a
>> per channel basis.
> Ssh doesn't see it as two separate channels, just a single
> bidirectional stream.

Really? My understanding is that the application layer congestion 
control in ssh2 is occurring on a per channel basis. So something in 
there is aware of multiple channels and can act on them appropriately.

> Also I'm not sure if it's possible to implement Nagle in the
> application layer, without knowledge of network congestion state. 

Thats a good point. It would have to know what is happening with unacked 
outstanding data. This is more difficult with some OSes but some 
versions of linux 2.4 and all of 2.6 and the new windows Vista have a 
TCP MIB available for SNMP queries. So application layer awareness of 
the network layer is feasible in some instances. The question is if it 
would be worth the hassle. Of course, in this case its probably not 
worth it for what is probably going to be an ever decreasing number of 
edge cases vis a vis nagle.

More information about the openssh-unix-dev mailing list