High Performance SSH/SCP - HPN-SSH when?

Corinna Vinschen vinschen at redhat.com
Tue Apr 4 19:32:33 EST 2006


On Mar 25 23:37, Chris Rapier wrote:
> [http://www.psc.edu/networking/projects/hpn-ssh/]
> Development is on going and new version of the patch will be available 
> shortly. This new version of the patch will hopefully address a 
> performance issue in LAN transfers.

Not sure if it's ok to discuss this here. However, we have some
performance problems on Cygwin with the vanilla version of OpenSSH.  The
main problem is the size of the read buffers in the client loop, resp.
client_process_net_input/client_process_input.  The buffer size is a
fixed 8K.  For some reason this degrades performance on Windows
enormously, when a copy is made from a remote machine to the local
machine, like this:

  scp remote:file .

Consider an example file of 118 Megs.  A copy from the Cygwin box to
Linux:

  linux> scp cygwin:file .
  file   100%  118MB  13.2MB/s   00:09

Copying from Linux to Cygwin on the other hand:

  cygwin> scp linux:file .
  file   100%  118MB   1.3MB/s   01:31

By raising the aforementioned buffers in clientloop.c from 8192 to, say,
87380 (default tcp recv buffer size), the latter copy is way faster:

  cygwin> scp linux:file .
  file   100%  118MB   6.2MB/s   00:19

I also tried the HPN patch, but it doesn't help for this specific
situation.  The HPN patch does not touch the application's read buffer
size and it turns out that neither changing the underlying SO_RCVBUF
buffer sizes nor changing TCP_NODELAY have a really relaxing effect on
this situation (less than 10%).  

On the contrary, keeping the application buffers at 8K, the performance
even degrades with the HPN patch:

  cygwin> scp linux:file .
  file   100%  118MB   1.0MB/s   01:58

So, to circumvent the performance problem, the only feasible solution
for Cygwin is to raise the buffer sizes in client_process_net_input/
client_process_input.

My question to the OpenSSH core developer team is this:

Is it ok to do that?  Is there any problem you would expect from raising
the buffer sizes?  Is there any reason to keep the buffers at 8K in the
vanilla version or would it be ok to raise the buffers to a somewhat
bigger value like 64K or the aforementioned 87380 bytes?


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat




More information about the openssh-unix-dev mailing list