[PATCH] Improving sftp client performance

Tobias Ringstrom tori at ringstrom.mine.nu
Sun Jan 6 08:26:50 EST 2002


On Sat, 5 Jan 2002, Tobias Ringstrom wrote:

> On Fri, 4 Jan 2002 mouring at etoh.eviladmin.org wrote:
> 
> > No it was not in the CVS tree yet.  There was still discussions as to the
> > implementation.  I have a version that does not do more more then two
> > overlapping writes.
> 
> I tried to vary the number of overlapping writes, but there is something 
> (not so) funny going on that I must understand first.  It seems to have 
> something to do with pipes/lo in Linux.  I'll be back...

Eureka!  I found the real problem.  I had a feeling somthing was not right 
when I needed such a big number of overlapping requests.

The problem is the Nagle algorithm.  Adding TCP_NODELAY to both ssh and
sshd makes them fly.  Adding a flag to ssh that turns off Nagle would be
easy.  I wonder what the best way is to to turn it off on the server side.
One way is of course for the client to turn it off remotely.  Another way
would be to turn it off per subsystem using the config file.  Yet another
way would be for the subsystem to send a signal to its sshd.  What do you
think?

> > we want to go this way I really suggest we flesh out that defination using
> > -r.  That way the user can optimize it for themselves.  With -r 1 mimicing
> > the current behavior.  Then set a default (2 - 4) if -r is not used.

With TCP_NODELAY, using two outstanding requests should be enough.  

/Tobias




More information about the openssh-unix-dev mailing list