This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin TCP slow

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

if you don't already have wireshark, get it from
get iperf-2.0.9.tar.gz from
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  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 as the OP said, have a look at;a=blob;f=winsup/cygwin/;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.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]