cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PROF RFC 1/2] profiling of libcurl by curl-loader, steady state

From: Robert Iakobashvili <coroberti_at_gmail.com>
Date: Thu, 19 Apr 2007 09:54:10 +0200

Hi Yang,

> On 4/18/07, Yang Tse <yangsita_at_gmail.com> wrote:
> > The attached patch saves one call to curlx_tvnow(), which calls
> > gettimeofday(), in each of Curl_socket_ready(), Curl_poll() and
> > Curl_select() when these are called with a zero or infinite timeout.

> > I'm not sure if the profiling you're doing would notice the difference or not.

This is already decreases the number of gettimeofday() per each recv call
for about 20%, which is very good !
Thank you.

Oprofile data present gettimeofday related consumption of CPU in the following
hypostasis:
a) glibc -gettimeofday;
b) kernel (vmlinuz) - do_gettimeofday and sys_gettimeofday;
c) partially in kernel (vmlinuz) - system_call;
The sum of above is significant.

It could be more places, like Daniel mentioned multi_socket*,
to optimize.

Thank you.

Sincerely,
Robert Iakobashvili,
coroberti %x40 gmail %x2e com
...................................................................
Navigare necesse est, vivere non est necesse
...................................................................
Received on 2007-04-19