delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/11/30/16:14:16

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=R557agr
ZrXN6HGTsiWNtNS//2gKzc1IsE/ZAA+EsT41mz0gIjm7Pyx0P6/+zJ0Va+kW8XZ9
/I3xwuJ3Ru4DR9dEQwwsDZbYAiH5W3whwnT0ZFp9SWiAAGrVIup0KYC3OR9+tUnh
hFh/0UTQEjxJYsYlW+JyuAYzhkH905dKoKmA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=XqeyZXQZBaWBg
dHk5vmUYbxF8ww=; b=TsxH0NV71kQmlEvW2r702KapiyzIb4DRhlTvCJEA2kOd5
ZS+IT4JUPox7S1DijhbUg8fXYhRAoeuV5fF6RljP+M/JAE7Z8Q56aE+YhhBpFSVx
pvCR1tlYiemASKZagB5ZDfz2jF2fEHzvG9PJ5D9NbiELe9jvCK1r7/cWB1+KxA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*MI:sk:CAD8GWs, Hx-languages-length:1890, click, lucky
X-HELO: mail-io0-f171.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=DiS9AD7KNQO1Vf3DRdnuOH/DK0bwtBevO9Z9LeG8qKg=; b=Oq9VSiifgM6ogYDTbddoHkoJMLNT6dimsbNm6+JGmh6QE+MH8QT5rIeZqsxQEZbWm8 KVTFfPU/Mpw+YKzgd+JX/EKm/kWpqg9tXIMp35W9/UYF5IeVYd2Z7vLDbyR9sW8BjaNQ D8bNOR8QXY3LeX8Tshp+eZiKF4b1f3jkveGWoccVL2ZKjoG0/sRppyOanv7rwV6wJSiI qy6+1mIeDtywn4n2nijF7FDiHu643Cj75FWxsy5nFNK9goTgdrQU6mribnX77ixWH7xD O8fmDCrWSEkA2AAYynCW4Q2TWGghhqvg9YfuD2pRO/3yEvUaOyWWcgR2xDtjQ7Wu2voE otkQ==
X-Gm-Message-State: AKaTC02DJPKeHZ6A7vT5y/n+qE6VxtNOxfWOp6H21jd1/6WCWS+xr56L7M4tP5kYCtMa5hD/ZuWDW5wiLw2ALw==
X-Received: by 10.107.169.221 with SMTP id f90mr30560637ioj.107.1480540426734; Wed, 30 Nov 2016 13:13:46 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <96dd675e-5b75-aced-0762-c67e96d33f67@SystematicSw.ab.ca>
References: <CAO1c0AT52ZzCKc3yD_7eX6ri4VubrTb5L+X-4vHWoXBAX2jsfw AT mail DOT gmail DOT com> <5adc37f5-608b-6c1f-6d14-83343c82dc9f AT SystematicSw DOT ab DOT ca> <CAO1c0ARyXv76_7WO3mvZFjmZ1yYw8Q8bcz5e37YpuVmqhJwejg AT mail DOT gmail DOT com> <CABHT963SLLrcAxNgD+bUEarohJNj=M=HA34S_2mG86OfLCO3=A AT mail DOT gmail DOT com> <96dd675e-5b75-aced-0762-c67e96d33f67 AT SystematicSw DOT ab DOT ca>
From: Lee <ler762 AT gmail DOT com>
Date: Wed, 30 Nov 2016 16:13:45 -0500
Message-ID: <CAD8GWss1zb1J7m3Knf1TGuAPcVKQVNFXgt2uX02o_Z08ZOfEOw@mail.gmail.com>
Subject: Re: Cygwin TCP slow
To: Brian DOT Inglis AT systematicsw DOT ab DOT ca, cygwin AT cygwin DOT com
X-IsSubscribed: yes

I don't know if this qualifies as a simple test case, but

if you don't already have wireshark, get it from
https://www.wireshark.org/download.html
get iperf-2.0.9.tar.gz from https://sourceforge.net/projects/iperf2/files/
change the setsockopt calls on lines 125 & 132 of src/tcp_window_size.c to
  rc = 0;

./configure  --prefix=/usr/local
make && make install

start wireshark & add a column for bytes in flight:
edit / preferences
appearance / columns
click on the "+" button to get a new row
double click on the "New Column", type BIF
double click the empty bit in the Fields column
type tcp.an  which pulls up a pick list; click on tcp.analysis.bytes_in_flight
click on OK
find a public iperf server -- I got lucky & found one ~65ms away, so
thruput is going to be constrained by the 130ms round trip time.

start the wireshark capture
iperf  -c <host name>

when it's done stop the capture & click on the BIF column header

What I get is a max bytes in flight of 66560

----recompile iperf using the windows cross-compiler
make clean
make distclean
./configure  --prefix=/usr/local --build=i686-pc-cygwin --host=i686-w64-mingw32
make && make install

start capturing
iperf  -c <host name>

when it's done stop the capture & sort on the BIF column
What I get is a max bytes in flight of 196608

So, for me, it's about a 3X difference between the native & cygwin app.


If the problem really is in net.cc as the OP said, have a look at
https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/net.cc;h=e4805d3e11c3cea09b1cdfa27170dfe626265125;hb=HEAD

starting at line 587
/* Raise default buffer sizes (instead of WinSock default 8K).

I think starting with Windows Vista the default is tcp autotuning.  So
unless there's some other reason for setting the send/receive buffer
it seems that cygwin apps would be better off going with the defaults.

Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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