curl-library
Re: help: libCURL with epoll
Date: Tue, 22 Nov 2011 23:34:05 +0100
On Tue, Nov 22, 2011 at 10:52 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Tue, 22 Nov 2011, Kopparapu, Sangeeta (GE Healthcare, consultant) wrote:
>
> I did not aware that name resolver would make difference. But now, after
>> this email, I built libCURL to make use of c-ares library for name
>> resolution. Another thing I would like to brought up here is, I use IP
>> address in my HTTP request (for e.g., http://190.190.190.190:85/get_**
>> me_this_file.jpeg <http://190.190.190.190:85/get_me_this_file.jpeg>). Is
>> there a way to optimize here like bypassing name resolution!!!
>>
>
> When you use plain IP addresses there is no name resolving involved, so
> the theories we had around that were wrong!
>
>
> unless libcurl went under considerable changes of how it uses c-ares
>> (based on 5 second look of Curl_open() it appears it didn't) there
>> shouldn't be any performance differences between 7.21.4 and 7.23.1).
>>
>
> First, Curl_open() is in no way critical for speed.
>
>
Actually it is, on my machine, when curl is built without c-ares,
curl_easy_init() takes on average 60 microseconds. When using c-ares it's
about 1100 microseconds for me, because with no c-ares there's no resolver
init, with c-ares it has to init ares resolver (memory allocs, reading
resolv.conf, etc) for each easy handle created. When doing 400 req/s as I
do, that's a very noticeable time difference.
Secondly, you did a 5 second look and could tell that there's no
> performance difference?
>
> $ git diff --stat curl-7_21_4..curl-7_23_1 -- lib | tail -1
> 180 files changed, 12342 insertions(+), 8667 deletions(-)
>
> I would say the opposite: I would be surprised if both those versions
> would show the exact same performance...
>
>
>
As the problem I was talking about is all about Curl_open(), and curl
still initializes ares resolver the same way (i.e. easy handles don't share
ares resolver through multi handle, dunno whether that's because it's not
possible for some reason or you guys simply didn't have time), I thought
it's fairly safe to assume that performance of easy handle initialization
is more or less the same. Please correct me if I'm wrong so I can upgrade
immediately :)
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-22