This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: very poor cygwin scp performance in some situations


On Mar 28 19:43, Steven Hartland wrote:
> From: "Corinna Vinschen"
> >- The worst of all is ssh itself.  When reading blocks from the network,
> > it uses an 8K buffer.  Whatever you try with setting different socket
> > buffer sizes or disabling the Nagle algorithm, nothing has any
> > interesting impact if not ssh's own buffer is raised in size.  By just
> > setting the buffer to 64K (in the ssh source file clientloop.c,
> > function client_process_net_input, line 575), the above copy started on
> > Cygwin suddenly races along with 4.2MB/s.
> 
> I just tried the same thing here and get:
> >From FreeBSD to Cygwin, started on Cygwin: 8.7MB/s up from
> 6.4MB/s unpatched.
> 
> Thats a good improvement, unfortunately it has no bearing on the key
> test here which is:
> >From Cygwin to FreeBSD, started on FreeBSD which is still 731KB/s

Well, this will be some other buffer, this time in sshd.

> >- The default WinSock send/recv buffer size is apparently 8K.  This is a
> > quite small buffer for bulk data transfer.  Raising this buffer to 64K
> > (setsockopt's SOL_SOCKET/SO_RCVBUF option), too, results in a
> > throughput of 5.9MB/s.
> >
> > Note that the performance suffers again, if the socket buffer is
> > smaller than the application buffer.
> 
> I'd be interested in trying this, where abouts did you set this in
> the ssh code?

I've set it in Cygwin since I know the code better.  In ssh, you'd
do it after calling socket() and before calling connect() resp. bind().

> >- Disabling the Nagle algorithm (setsockopt's IPPROTO_TCP/TCP_NODELAY
> > option) doesn't really have a lot of impact, but it's slightly
> > noticable.  The throughput goes up to 6.1MB/s.
> 
> Again could you tell me where you set this?

For testing, in ssh_session2_setup in ssh.c.  You could just set it
where you set the buffer size, though.  If you need a good example, use
the HPN patch.

> ================================================
> This e.mail is private and confidential between [bla].

Sigh.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]