cURL / Mailing Lists / curl-library / Single Mail


Re: Slow Upload Performance on High-Bandwidth connections on windows

From: Christian Hägele <>
Date: Fri, 01 Feb 2013 15:07:37 +0100

Am 01.02.2013, 13:47 Uhr, schrieb Gisle Vanem <>:

> Did you also see the comment in include/curl/curl.h?
> can be set a compile-time. I suggest you do that to not make transfer
> slower
> for people using an older Windows (Win-XP).

The size of 16KiB seems to be a good choice for most situations. As this
value has to be set at compile time I wouldn't touch it.

> The problem described in
> doesn't seems to apply to Win-Vista. So do you mean Curl_sendbufset()
> should not be set for Vista/2008 R2? If so, there should be an adaption
> to the running Windows version. Try it; ref. curl_sspi.c.

I encountered the problem described in the KB-articem yself once.
I did some research on the issue, but unfortunately I don't remember
everything. But what I remember was that the problem only occurs in very
special circumstances. In that case it was the chunk size of 80KiB
which reproduced the issue. Maybe the issue only occurred when the
CURL_MAX_WRITE_SIZE was set to 20 KiB? Does someone know?

I wouldn't do a special workaround depending on the OS during runtime.
Such workarounds often lead to more problems in the future and it
makes the code worse.

As nobody knows the reason for that workaround exactly I would suggest
to make an option to set SO_SNDBUF.
That could also work on all OSes which support the socket option SO_SNDBUF.
Many other programs have similar command line options.
But for the standard-case I wouldn't touch the SO_SNDBUF-size at all and
let the OS do its magic (that's what currently done for SO_RCVBUF). On all
modern OSes this should be the best choice.

Any opinions an that?


List admin:
Received on 2013-02-01