public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Johan van den Berg <johan.vdberg@playsafesa.com>
To: marco atzeri <marco.atzeri@gmail.com>
Cc: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: Building cygwin1.dll
Date: Wed, 04 Jan 2012 19:26:00 -0000	[thread overview]
Message-ID: <B6F87B4D-C088-49BF-B52C-3D0168EAC78D@playsafesa.com> (raw)
In-Reply-To: <4F04613B.6050505@gmail.com>

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

  reply	other threads:[~2012-01-04 19:26 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 13:49 Johan van den Berg
2012-01-04 14:25 ` marco atzeri
2012-01-04 19:26   ` Johan van den Berg [this message]
2012-01-09 13:44     ` socket performance (was Re: Building cygwin1.dll) Corinna Vinschen
2012-01-09 16:37       ` Václav Zeman
2012-01-10  8:46         ` Corinna Vinschen
2012-01-10  7:22       ` socket performance Henry S. Thompson
2012-01-10  7:53         ` Daniel Colascione
2012-01-10 12:46       ` socket performance (was Re: Building cygwin1.dll) Johan van den Berg
2012-01-10 14:46         ` Corinna Vinschen
2012-01-10 15:25           ` Steven Hartland
2012-01-10 16:28             ` Corinna Vinschen
2012-01-10 16:39               ` Corinna Vinschen
2012-01-10 17:05               ` Steven Hartland
2012-01-10 17:27                 ` Corinna Vinschen
2012-01-10 18:23                   ` Steven Hartland
2012-01-11 14:05                     ` Corinna Vinschen
2012-01-11 14:20                       ` Carson Chittom
2012-01-11 14:43                         ` Corinna Vinschen
2012-01-11  6:25           ` Johan van den Berg
  -- strict thread matches above, loose matches on Subject: below --
2002-05-28 15:35 Building cygwin1.dll Keen Wayne A Contr AFRL/MNGG
2002-05-29  4:19 ` linguist-cygwin
2002-05-26 13:58 CM
2002-05-28 13:52 ` rich-paul
2002-05-28 13:58   ` Larry Hall (RFK Partners, Inc)
2002-05-28 14:09     ` Christopher Faylor
2002-05-28 14:11       ` Larry Hall (RFK Partners, Inc)
2002-05-28 14:17         ` Christopher Faylor
2002-05-28 14:40           ` Larry Hall (RFK Partners, Inc)
2002-05-29  4:03       ` rich-paul
2002-05-29  4:16     ` rich-paul
2002-05-29  4:36       ` Christopher Faylor
2002-05-29  9:27         ` rich-paul
2002-05-29 10:31           ` Christopher Faylor
2002-06-01 22:04             ` rich-paul
2002-06-01 22:36               ` ..
2002-06-01 23:28               ` Christopher Faylor
2002-06-02  4:44                 ` rich-paul
2002-05-29  5:01       ` Larry Hall (RFK Partners, Inc)
2000-10-31 10:47 Fabio Fabbri
2000-10-31 20:27 ` Christopher Faylor
2000-01-11 13:16 building cygwin1.dll Alexey Voinov
2000-01-11 14:51 ` Mumit Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B6F87B4D-C088-49BF-B52C-3D0168EAC78D@playsafesa.com \
    --to=johan.vdberg@playsafesa.com \
    --cc=cygwin@cygwin.com \
    --cc=marco.atzeri@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).