cURL / Mailing Lists / curl-library / Single Mail


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

From: Daniel Stenberg <>
Date: Mon, 4 Feb 2013 14:09:49 +0100 (CET)

On Fri, 1 Feb 2013, Christian Hägele wrote:

>> 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.

Well, we got reports in the past showing problems unless we followed the
advice. Clearly we're now facing an issue that needs to be applied in some
cases but is downright wrong in other situations. How lovely.

> As nobody knows the reason for that workaround exactly I would suggest
> to make an option to set SO_SNDBUF.

The problem with that is that nobody would ever know when to set that option
or not. You basically would just have to experience the problem and then at
run-time fairly arbitrarily try the next transfer with the option set. It
seems like a pretty awful way really...

> That could also work on all OSes which support the socket option SO_SNDBUF.

We already have a callback option that allows the application to set socket
options so this can already be done.

The point with the SNDBUF modification libcurl does is that Microsoft clearly
says there's a risk for problems otherwise and it is libcurl's job to try to
act as good as possible to work everywhere in an optimized way.

But yes, it needs improvements here. I can't think of any better way to solve
this than to detect OS level at run-time and only SNDBUF if <= windows 2008,
so that Vista and later won't get it changed.

> On all modern OSes this should be the best choice.

Right. Unless the vendor says it isn't. =)


List admin:
Received on 2013-02-04