Re: building async-calls

From: Tsantilas Christos <chtsanti@dont-contact.us>
Date: Mon, 17 Dec 2007 04:58:57 -0500 (EST)

Hi Adrian,
  As I am seeing squid3 spends time in EventScheduler::schedule method.
This method did not affected by the new AsyncCall code. Also this method
is similar with squid 2.6 eventAdd function.

The only I can say is that possibly we are scheduling a huge number of
events in squid3.
If the time spend while creating the ev_entry class possibly we need a
(better?) memory allocator.

Also there is a for loop in this method. Most event scheduled with when=0
so they attached at the end (or near the end) of the events list (but we
are running all the list). If we have a big number of events (1000 or
more) it is possible to spend a lot of time here.
But if this is the problem it is easy for someone to fix it, we must not
worry about it at this time....

--
  Christos
>
> CPU: AMD64 processors, speed 2613.46 MHz (estimated)
> Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit
> mask of 0x00 (No unit mask) count 100000
> samples  %        image name               symbol name
> 27013    44.2713  squid                    EventScheduler::schedule(char
> const*, void (*)(void*), void*, double, int, bool)
> 2618      4.2906  libc-2.6.1.so            memcpy
> 2217      3.6334  libc-2.6.1.so            memset
> 1425      2.3354  squid                    MemPool::clean(long)
> 913       1.4963  squid                    mem_node::dataRange() const
>
> Might want to fix that..
>
>
>
> Adrian
>
>
Received on Mon Dec 17 2007 - 04:06:47 MST

This archive was generated by hypermail pre-2.1.9 : Mon Dec 31 2007 - 12:00:03 MST