curl-library
Re: Time spent in ares_init_options
From: Gisle Vanem <gvanem_at_yahoo.no>
Date: Wed, 15 Jul 2015 22:32:30 +0200
Date: Wed, 15 Jul 2015 22:32:30 +0200
Paul Oliver wrote:
> I've written a libcurl application based on the hiperfifo example and have run into something I'm unsure about. I have
> a test that kicks off requests to around 9K distinct URLs concurrently. It seems that ~75% of time during this test is
> spent inside ares_init_options. Is this expected behaviour? I've called curl_global_init at the start of main. Is
> there anything I'm missing?
>
> Here's a screenshot of the trace: https://www.dropbox.com/s/zghmckkrnj10qov/Screenshot%202015-07-15%2021.05.57.png?dl=0
It looks like it opens and fread() your /etc/hosts file
many times. Do you have a large hosts file?
There must be a way to do this only once.
-- --gv ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-07-15