sftp performance problem, cured by TCP_NODELAY

Miklos Szeredi miklos at szeredi.hu
Wed Jan 25 08:08:02 EST 2006


> 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.

Miklos




More information about the openssh-unix-dev mailing list