X-Spam-Check-By: sourceware.org
Date: Tue, 14 Mar 2006 17:43:04 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: select() too slow
Message-ID: <20060314224304.GC7159@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
References: <1753CE61-D772-46F7-8393-84E419E49307@ptnix.com> <4412EF74.1070500@byu.net> <890F74C6-8E51-405F-86CC-551170A2EA70@honeynet-pt.org> <20060311181653.GA10054@trixie.casa.cgf.cx> <F8A4659D-D483-4219-9EAF-7698FFC5A938@honeynet-pt.org> <20060314191855.GA17565@trixie.casa.cgf.cx> <1B24AE67-B28C-4D8E-A655-5D42E92B7F0C@honeynet-pt.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1B24AE67-B28C-4D8E-A655-5D42E92B7F0C@honeynet-pt.org>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Tue, Mar 14, 2006 at 09:42:25PM +0000, Pedro Inacio wrote:
>I'm goin to explain everything step by step in order to be now doubts.
>
>One computer with dual boot, Linux in one partition and Windows with  
>Cygwin installed on another partition.
>
>Boot on Linux compile echo_server.c, run it and it will listen on tcp  
>port 12345
>Imagine that the IP address of the system is 192.168.1.1
>
>Go to some other Linux system on the network, create or choose some  
>"big_file" you have there and run:
>
>time cat big_file | nc -w 1 192.168.1.1 12345 > /tmp/output
>
>Ok, before w is a dash, it's a matter of charset encoding.
>What this command will do is it will cat the big_file and send data  
>via nc (netcat) to the system where the echo_server is running, then  
>the echo_server receives the data and sends it back. When done you  
>will see how much time that process toke. The value 1 after w is to  
>disconnect nc after 1 second of timeout.
>
>This process, sending a 100 MB big_file takes 22 seconds on Linux.
>
>Now boot on Windows, and imagine that the IP address is 192.168.1.1,  
>run Cygwin compile echo_server.c, run it and do the same.
>The same process takes now 4 minutes sending the same big_file.

I don't have any 100MB files sitting around but when I tried this on a
14MB file, I find that cygwin is about 2X slower, not an order of
magnitude slower.  Taking away the pipe and using regular file redirection
makes things a little faster on cygwin.

So, I can't explain why you are seeing such extreme slowdowns.  I am using
the equivalent of a snapshot in my tests, however.  Maybe that's the
difference.

cgf

--
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/

