cURL / Mailing Lists / curl-library / Single Mail

curl-library

Slow Upload Performance on High-Bandwidth connections on windows

From: Christian Hägele <haegele_at_teamviewer.com>
Date: Fri, 01 Feb 2013 12:22:44 +0100

Hello,

I tried to use curl on Windows Server 2008 R2 to do FTP-Uploads. The
sender and the receiver has 1GBit connections and with other tools a
tranfer-rate of 800MBit/s is possible. The two locations have a
round-trip-time of 19ms. When using curl to do a FTP-Upload the
transfer-rate is only about 12MBit/s.

The reason for that is the Curl_sndbufset-function in connect.c. On
windows the socket-sendbuffer is set to a value of CURL_MAX_WRITE_SIZE +
32 (16416 bytes). There is a also a strange comment why this is done.
When the SO_SNDBUF is not explicitly set the socket-sendbuffer is
increased automatically by the OS (starting with windows Vista/Server
2008).

If I comment out that code the transfer-rate increases to more than
300MBit/s. That's more than 20x improvement!!!

I suggest to either remove that code completely or make it at least
optional, because the impact of that little code is very big.

Any comments about that issue?

Regards,

Christian

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-01