Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-T2-Posting-ID: IBEbVI5rtGvBBu0aty/gAw== Message-ID: <42711942.3000607@ege.cc> Date: Thu, 28 Apr 2005 19:11:30 +0200 From: Bernhard Ege User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Cygwin List Subject: Re: scp/ssh between two cygwin installations very slow References: <426D28E3 DOT 4080303 AT ege DOT cc> <426D48F4 DOT 5040908 AT ege DOT cc> <20050425194900 DOT GB14164 AT trixie DOT casa DOT cgf DOT cx> <426D75FE DOT 9090003 AT ege DOT cc> <6 DOT 2 DOT 1 DOT 2 DOT 0 DOT 20050427230829 DOT 08920ae0 AT pop DOT prospeed DOT net> In-Reply-To: <6.2.1.2.0.20050427230829.08920ae0@pop.prospeed.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Larry Hall wrote: > At 06:58 PM 4/25/2005, you wrote: > >>Christopher Faylor wrote: >> >>>On Mon, Apr 25, 2005 at 09:45:56PM +0200, Bernhard Ege wrote: >>> >>> >>>>Bernhard Ege wrote: >>>> >>>> >>>>>I am trying to copy an 800MB file from my pc to my laptop. The pc has cygwin and cygwins sshd running and from the laptop I use the scp command to copy the file. >>>>> >>>>>Result: 190kB/s with low (1-5%) cpu usage on both machines. >>>>> >>>>>Expected result: at least 2-3MBps with somewhat higher cpuusage on both machines. >>>> >>>>Doh. I completely forgot that in my .ssh/config I had ssh call a script using the ProxyCommand. That command is a shell script that detects which network I am connected to (company or my own) and uses a tunneling ssh command to the destination if on the company network or a direct connection using "connect" if on my own network. >>>> >>>>The connect command is a fairly simple program that redirects stdin/stdout to a host:port. This way, I can either use a ssh to host:port if tunneling is required to connect to host:port if not. >>>> >>>>The problem is that cygwin has a very low throughput using the script with the connect command. I guess it could be related to the slow pipe problem mentioned earlier (but was supposedly fixed). >>>> >>>>I have tried without the ProxyCommand and the speed returned to an acceptable 1.5MBps. >>>> >>>>I hope Cygwin can be fixed so the speed returns to normal :-) >>> >>>Yep. We'll get right on fixing that problem where fairly simple >>>programs which redirect stdin/stdout to a host:port cause reversions in >>>behavior of the "slow pipe" problem which was supposedly fixed. >> >>It was either that kind of reply or some other reply indicating what additional info is required. Obviously I would submit the required information, but I don't know what would be relevant. >> >>Anyway, here is the link to connect.c: >> >>http://www.taiyo.co.jp/~gotoh/ssh/connect.html >> > > >>And just create script like ssh-connect.sh: >> >>#!/bin/bash >>connect $1 $2 >> >>And in .ssh/config add the script to a destination: >> >>ProxyCommand ssh-connect.sh %h %p >> >> >>scp'in from the host which is reached through connect has its speed severely reduced. >> >>It may be the problem with connect itself, but I am not sure how to test that. > > > > Seems like something is going on with the compiled version of connect that > you pointed to. If I try what you mentioned above with the precompiled > version, it is dreadfully slow for me as well (at least several orders of > magnitude slower). Building a local one from source with Cygwin was allot > better, though still slower than without it (by 4 to 5 times). You might > want to try a local build if you need to rely on connect. It's allot better > than the alternative. The one I tried _was_ the freshly compiled (by my self) version. I did not try the precompiled version. The slowdown you experience (4-5 times) approximately matches the slowdown I see as well. Connect.c is probably not quite cygwin friendly yet (or the other way around), but I haven't found any alternative (though I haven't looked very hard, only mildly hard ;-). However, the job connect has to do seems simple enough: Establish connection in host:port, create 2 threads (or 1 more), one thread reading from standard in and output on socket out and one thread to read from socket and write to standard out. connect handles a few protocols, but for this to work, data should just be passed right through, i.e. no protocol handling necessary. Bernhard -- 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/