X-Spam-Check-By: sourceware.org X-AntiVirus: PTMail-AV 0.3.88 X-Virus-Status: Clean (0.00726 seconds) Mime-Version: 1.0 (Apple Message framework v746.3) In-Reply-To: <20060314191855.GA17565@trixie.casa.cgf.cx> References: <1753CE61-D772-46F7-8393-84E419E49307 AT ptnix DOT com> <4412EF74 DOT 1070500 AT byu DOT net> <890F74C6-8E51-405F-86CC-551170A2EA70 AT honeynet-pt DOT org> <20060311181653 DOT GA10054 AT trixie DOT casa DOT cgf DOT cx> <20060314191855 DOT GA17565 AT trixie DOT casa DOT cgf DOT cx> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1B24AE67-B28C-4D8E-A655-5D42E92B7F0C@honeynet-pt.org> Content-Transfer-Encoding: 7bit From: Pedro Inacio Subject: Re: select() too slow Date: Tue, 14 Mar 2006 21:42:25 +0000 To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 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 think now it is impossible to detail more the process I'm doing. Hope that helps to identify what the problem is. Why it takes so much more time on Cygwin than on Linux? On 2006/03/14, at 19:18, Christopher Faylor wrote: > On Tue, Mar 14, 2006 at 06:59:28PM +0000, Pedro Inacio wrote: >> Hello again, >> >> as promised attached you will find a very simplistic non-blocking >> echo server that compiles on Linux and Cygwin. >> The main objective is that you compile it and run on both >> environments. >> Of course that the same hardware is recommended in order to compare >> the results in a more accurate way. >> >> After compile and run it, on a different machine you do something >> like: >> >> $ time cat big_file | nc ?w 1 echo_server_ip_address port > dest_file > > Please provide the *exact* command you used to run this. You don't > have > to provide the "big_file" but the above command contains a garbage > character which can't be what you actually typed. What is > "echo_server_ip_address" and "port" in the above? Again, if you want > help, you are going to have to try harder to explain exactly what you > are doing. > > 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/ > -- 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/