cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Difference in curl performance between RHEL6 and RHEL7

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Tue, 12 Aug 2014 13:46:10 +0200

On Tuesday, August 12, 2014 12:29:55 Alastair Scobie wrote:
> On 12/08/14 12:18, Kamil Dudka wrote:
> > On Tuesday, August 12, 2014 10:05:37 Alastair Scobie wrote:
> >> Whilst porting an in-house application, which uses libcurl, from RHEL6
> >> to RHEL7 we noticed that the time taken by libcurl to fetch a page had
> >> substantially increased. Even an attempt at fetching a non-existent page
> >> has increased from 10-20ms to around 150ms. This with just plain HTTP.
> >
> > What exactly do you mean by a non-existent page?
>
> A page for which you'll receive a 404. Ie. HTTP server address is
> correct, but actual page requested doesn't exist.
>
> >> Our first thought was that the API has changed in some subtle way and
> >> the fault must be in our code, but then we thought to try measuring the
> >> performance of the curl tool itself. To our surprise, we found the same
> >> performance disparity.
> >>
> >> Interestingly...
> >>
> >> * Adding the DNS address of the HTTP server to /etc/hosts (and
> >> specifying files,dns in /etc/nsswitch.conf) does not improve things
> >
> > Did you try to measure the time consumed by 'getent ahosts'?
>
> Small number of ms for both RHEL6 and RHEl7.
>
> >> * but, performance when using an IP address in the URL is fine (~
> >> 10-20ms) for both RHEL6 and RHEL7
> >
> > I was not able to reproduce this behavior. Is it reproducible locally?
>
> Yip, on several machines. I can ship you an strace if you like?

I would prefer a self-contained program that I can use to repeat the bug.

> (Daniel's suggestion of disabling the threaded resolver has fixed the
> issue for us).
>
> Cheers, Alastair

The problem is that either you will not receive security updates for (lib)curl
any more, or the threaded resolver will be re-enabled on the next update.

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-12