cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multiple parallel requests with curl multi slow with libnss

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 16 Nov 2015 12:38:14 +0100

On Monday 16 November 2015 12:08:23 Rainer Canavan wrote:
> I've finally managed to grab a tcpdump of one of those 11s
> multi-requests, and it looks like not even the TCP connections are
> opened in parallel in that case, but instead two connections are
> handled completely sequentially (i.e. starting with SYN via TLS
> handshake and data, and ending with FIN ACK) until, after around 8s,
> the remaining 8 requests are started in parallel and processed
> sequentially in the same manner as with those 2.4s requests.
>
> Is this a known problem with libnss?

libcurl in RHEL 7.1 did not support non-blocking TLS handshake. It is going
to be introduced in RHEL 7.2. However, it should work with upstream libcurl
7.45 because the feature was introduced in 7.37:

https://github.com/bagder/curl/commit/curl-7_37_0~117

> Are there workarounds?

A possible workaround would be to use a separate thread for each connection.

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-11-16