delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/19/08:58:32

X-Spam-Check-By: sourceware.org
X-AntiVirus: PTMail-AV 0.3.88
X-Virus-Status: Clean (0.00705 seconds)
Mime-Version: 1.0 (Apple Message framework v746.3)
In-Reply-To: <20060315214927.GA31919@calimero.vinschen.de>
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> <F8A4659D-D483-4219-9EAF-7698FFC5A938 AT honeynet-pt DOT org> <20060314191855 DOT GA17565 AT trixie DOT casa DOT cgf DOT cx> <1B24AE67-B28C-4D8E-A655-5D42E92B7F0C AT honeynet-pt DOT org> <20060314224304 DOT GC7159 AT trixie DOT casa DOT cgf DOT cx> <A0A99977-0C6D-4AFB-834A-5A451F3760F8 AT honeynet-pt DOT org> <20060315214927 DOT GA31919 AT calimero DOT vinschen DOT de>
Message-Id: <E8A5BEE9-9140-4B0B-B472-D2D4E33CAD92@honeynet-pt.org>
From: Pedro Inacio <pedro DOT inacio AT honeynet-pt DOT org>
Subject: Re: select() too slow
Date: Sun, 19 Mar 2006 09:54:19 +0000
To: cygwin AT cygwin DOT com
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

Yes! I've confirmed that!

With TCP_NODELAY Cygwin and Linux times are similar.
It seems that there is some issue with the Naggle algorithm on  
Windows for sure.

Thanks

Pedro Inacio


On 2006/03/15, at 21:49, Corinna Vinschen wrote:


>
> It looks like this is a TCP_NODELAY issue.  You tend to get the  
> problem
> if a socket is used "interactively", which means, being used for  
> reading
> and writing in arbitrary order.
>
> Unfortunately the Nagle algorithm on Windows is somewhat sluggish.   
> I've
> tried your echo_server with and without Nagle disabled.  Sending a 17
> Megs file from my Cygwin box to an echo_server on my Linux box takes
> between 4 and 5 seconds.
>
> Sending a 17 Megs file from Linux to an echo_server on Cygwin takes
> about 55 seconds.  However, when I disable the Nagle algorithm in the
> echo_server, it takes between 2 and 9 seconds.  I don't understand the
> unexact interval, but I also don't see how that could be Cygwin's  
> fault.
>
>
> --- echo_server.c.ORIG  2006-03-15 22:37:41.905621200 +0100
> +++ echo_server.c       2006-03-15 22:45:56.597789300 +0100
> @@ -62,6 +62,10 @@ int main(void) {
>
>    fcntl(client_fd, F_SETFL, fcntl(client_fd, F_GETFL) | O_NONBLOCK);
>
> +  int opt = 1;
> +  if (setsockopt(client_fd, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof  
> opt) == -1)
> +    fprintf(stderr,"setsockopt TCP_NODELAY: %.100s", strerror 
> (errno));
> +
>    while(1) {
>      FD_ZERO(&read_fds);
>      FD_ZERO(&write_fds);
>
>
> 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/
>


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