7 Jul 2009 13:53
Re: Read buffer size in clientloop.c
Darren Tucker <dtucker <at> zip.com.au>
2009-07-07 11:53:37 GMT
2009-07-07 11:53:37 GMT
On Tue, Jul 07, 2009 at 12:57:16PM +0200, Corinna Vinschen wrote: > when trying to optimize socket transfer rates under Cygwin, it turned > out that the underlying WinSock implementation is surprisingly sensitive > to buffer sizes. The latest Cygwin from CVS is now setting the socket > receive/send buffers (SO_RCVBUF/SO_SNDBUF) to 64K, rather than keeping > them at their default values of 8K which thwarts data transfers a lot. > > While testing I still had the problem that for some reason the ssh read > transfer rates were only a third up to a half of the write transfer > rates. It turned out that the culprit was ssh itself. In clientloop.c, > it defines read buffers of the size 8K. Setting them to 64K under > Cygwin raises the read transfer rates comparable to the write rates. > > It occured to me that we talked about this already 3 years ago in a > thread about HPN-SSH, just the performance numbers were different: > http://marc.info/?l=openssh-unix-dev&m=114414372902485&w=2 > > So the question I have is again this: > > Would it be ok to raise the buffers in client_process_net_input() and > client_process_input() to 64K, maybe only on Cygwin? Or to make the > buffer sizes a configurable option? If there's a measureable performance gain (which it sounds like there is) then I personally have no objection to making it a compile time option. Damien? Maybe something like this? Index: clientloop.c =================================================================== RCS file: /home/dtucker/openssh/cvs/openssh/clientloop.c,v(Continue reading)
RSS Feed