delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/28/14:16:17

X-Spam-Check-By: sourceware.org
Date: Tue, 28 Mar 2006 21:16:07 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: very poor cygwin scp performance in some situations
Message-ID: <20060328191607.GS20907@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <04b601c651b4$a1e9e020$b3db87d4 AT multiplay DOT co DOT uk> <20060328074041 DOT GJ20907 AT calimero DOT vinschen DOT de> <01f501c65254$796572e0$b3db87d4 AT multiplay DOT co DOT uk> <20060328143952 DOT GN20907 AT calimero DOT vinschen DOT de> <04e501c65297$7b4979b0$b3db87d4 AT multiplay DOT co DOT uk>
Mime-Version: 1.0
In-Reply-To: <04e501c65297$7b4979b0$b3db87d4@multiplay.co.uk>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019