sftp performance problem, cured by TCP_NODELAY

Rick Jones rick.jones2 at hp.com
Wed Jan 25 08:36:22 EST 2006


Miklos Szeredi wrote:
>>In broad handwaving terms, applications that try to do "write write
>>read" can run afoul of interactions between Nagle and delayed ACK.
> 
> 
> Which is exactly what sftp does.
> 
> Excerpt from sftp(1):
> 
> |      -R num_requests
> |              Specify how many requests may be outstanding at any one time.
> |              Increasing this may slightly improve file transfer speed but
> |              will increase memory usage.  The default is 16 outstanding
> |              requests.
> 
> I also noticed, that -R 1 actually increases throughput in some cases,
> which is nicely explained by the fact, that then it will always be
> "write read" pairs.
> 
> Of course -R 1 will still result in suboptimal throughput, so that is
> not the solution.

So, if the code knows it is going to inject N requests at one time, why not use 
writev() or sendmsg()?

rick jones
still interested in the packet trace though




More information about the openssh-unix-dev mailing list