I am very happy to report that increasing the send and receive buffers has done
the job (at least, on a 10MBit link but will be testing a 100Mbit in a few
days). I calculated the ideal size as per
http://www.ibm.com/developerworks/linux/library/l-hisock/index.html
$ diff -u cygwin-snapshot-20111222-1/winsup/cygwin/net.cc.orig
cygwin-snapshot-20111222-1/winsup/cygwin/net.cc
--- cygwin-snapshot-20111222-1/winsup/cygwin/net.cc.orig 2012-01-04
06:56:22.094250000 -0500
+++ cygwin-snapshot-20111222-1/winsup/cygwin/net.cc 2012-01-04
07:10:14.031750000 -0500
@@ -569,8 +569,12 @@
be nice, though.
(*) Maximum normal TCP window size. Coincidence? */
- ((fhandler_socket *) fd)->rmem () = 65535;
- ((fhandler_socket *) fd)->wmem () = 65535;
+
+ /* JVDB - 64K is too small for our 100mb link with 200ms latency. Bumped to
2MB
+ See http://www.ibm.com/developerworks/linux/library/l-hisock/index.html */
+
+ ((fhandler_socket *) fd)->rmem () = 2097152;
+ ((fhandler_socket *) fd)->wmem () = 2097152;
if (::setsockopt (soc, SOL_SOCKET, SO_RCVBUF,
(char *) &((fhandler_socket *) fd)->rmem (), sizeof (int)))
{
Thank you very much for the help!
Kind regards
Johan
On 04 Jan 2012, at 4:24 PM, marco atzeri wrote:
> On 1/4/2012 2:49 PM, Johan van den Berg wrote:
>> Any pointers on how to compile cygwin1.dll? I installed cygwin latest onto a
>> windows machine, installed all the prerequisites as per faq (gcc perl et
>> al), downloaded a snapshot, configured and maked but keep running into
>> compile errors.
>>
>> There is no mention in the docs regarding version of gcc required,
>> possibility of using gcc as supplied by cygwin or mingw, etc.
>> I am trying to build a custom cygwin1.dll to test
>> http://cygwin.com/ml/cygwin/2011-12/msg00337.html
>> I have set the send and receive buffers to 256k so that I can get transfer
>> speeds up on a high latency rsync copy from one cygwin windows to another
>> cygwin windows box with over 300ms latency between the two, but a 100mbit
>> bandwidth
>> I tested with a previous version (very old) of cygwin that had the buffers
>> at 8k and that caused the transfer speeds to go down to next to nothing, so
>> the theory seems sound that increasing the buffers should increase the
>> amount of packets that can be sent without receiving an ack.
>> I have already patched the code, now I just need to figure out how to
>> actually build cygwin, and 3 hours worth of google + reading of cygwin
>> mailing lists have been fruitless.
>>
>> The error I get when trying to compile using the default cygwin install of
>> gcc and tools:
>>
>> ... lots of successful compiles, and then:
>> make[5]: Entering directory
>> `/home/DBA/cygwin-build/cygwin-snapshot-20111222-1/build/i686-pc-cygwin/newlib/libc/locale'
>> gcc
>> -L/home/DBA/cygwin-build/cygwin-snapshot-20111222-1/build/i686-pc-cygwin/winsup
>>
>> -L/home/DBA/cygwin-build/cygwin-snapshot-20111222-1/build/i686-pc-cygwin/winsup/cygwin
>>
>> -L/home/DBA/cygwin-build/cygwin-snapshot-20111222-1/build/i686-pc-cygwin/winsup/w32api/lib
>> -isystem /home/DBA/cygwin-build/cygwin-snapshot-20111222-1/winsup/include
>> -isystem
>> /home/DBA/cygwin-build/cygwin-snapshot-20111222-1/winsup/cygwin/include
>> -isystem
>> /home/DBA/cygwin-build/cygwin-snapshot-20111222-1/winsup/w32api/include
>> -B/home/DBA/cygwin-build/cygwin-snapshot-20111222-1/build/i686-pc-cygwin/newlib/
>> -isystem
>> /home/DBA/cygwin-build/cygwin-snapshot-20111222-1/build/i686-pc-cygwin/newlib/targ-include
>> -isystem
>> /home/DBA/cygwin-build/cygwin-snapshot-20111222-1/newlib/libc/include
>> -I/home/DBA/cygwin-build/cygwin-snapshot-20111222-1/winsup/cygwin/include
>> -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
>> -DPACKAGE_VERSION=\"1.20.0\" -DPACKAGE_STRING=\"newlib\ 1.20.0\"
>> -DPACKAGE_BUGREPORT=\"\" -DPACKA
> GE_URL=\"\" -I. -I../../../../../newlib/libc/locale -DHAVE_OPENDIR
> -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE
> -DHAVE_FCNTL -DMALLOC_PROVIDED -fno-builtin -g -O2 -c -o
> lib_a-nl_langinfo.o `test -f 'nl_langinfo.c' || echo
> '../../../../../newlib/libc/locale/'`nl_langinfo.c
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: parse error
>> before "struct"
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: `outdigits'
>> undeclared here (not in a function)
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: initializer
>> element is not constant
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: (near
>> initialization for `nl_ext[0].offset')
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: parse error
>> before ')' token
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: initializer
>> element is not constant
>> ../../../../../newlib/libc/locale/nl_langinfo.c:66: error: (near
>> initialization for `nl_ext[0]')
>> .... and many more similar complaints.
>>
>> Johan van den Berg
>
> hi John,
>
> gcc and g++ version 4.5.3 (GCC)
> as provided by cygwin packages
>
> gcc4-core 4.5.3-3
> gcc4-g++ 4.5.3-3
>
> usually this is enough for building
>
> <source_path>/configure
> make
>
> Regards
> Marco
>
>
>
> --
> 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
>
--
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