On Tue, Oct 29, 2002, Andres Kroonmaa wrote:
> On 28 Oct 2002, at 2:20, Adrian Chadd <adrian@squid-cache.org> wrote:
>
> > The interesting point is the call graphs and the per-function CPU
> > utilisation - there's .. well, lots of them. In what could be said as
> > the understatement of the year on this list - I believe that the current
> > squid codebase (squid-2 _and_ squid-3) does, well, far too much.
> >
> > The commercial cache vendors out there will snigger. :)
> >
> > Perhaps we're doing the same thing multiple times on a request
> > (like parsing). Perhaps we could look at removing some of the
> > steps (eg, using an async version of writev() to write out headers
> > instead of packing them into a buffer first).
> >
> > I have the call graphs available from gprof if anyone is interested.
>
> gprof? isn't it showing you complete beans? thats the whole reason
> I wrote profiling branch.
Complete beans? I'll take a look at the profiling branch, but the
call graphs are the interesting bits I'm after.
> After quick search i found this:
> http://www.cs.cornell.edu/courses/cs612/2002sp/assignments/ps1/pmc/pmc.html
> You need some soft to play with Pentium performance monitoring counters.
> needs kernel support.
Right.
> Not very intuitive. On Solaris I have such util bundled, and I
> don't know how to make sense of what I get. My 2xcpu box with 100%
> utilisation shows about 2% or 10% of memory utilised, depending on
> view.
Hm, ok.
[snip output]
> I'd speculate that above says: there are 2-3 fsb requests outstanding per
> data_mem_refs (p0/p1), which is roughly 25% of cputime for each cpu, and
> that there is roughly 16-20% cputime spent on all data references, both
> cache hits and misses.
Hm. I'd probably do it with a single CPU, it might make more sense.
Squid shouldn't be using an even amount of time per CPU unless the pthreads
in aufs are taking more CPU than I remember them.
> chuckle, this is so funny. There is this huge array of counters in P3, and
> every time I try to use them, I find them useless..
:)
> There is also this funny counter: counter of ticks while cpu is NOT halted.
> its at about 50% on my box. So, its either that we are waiting for io, or
> cpu is stalled for whatever other reasons.
Curious.
I might have a go at it on my FreeBSD setup if I can get the tool to work,
but I still maintain that we may want to spend some time reviewing exactly what
is going on in the innards..
Adrian
Received on Tue Oct 29 2002 - 20:11:32 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:17:02 MST