Re: [squid-users] Profiling patch redo, need help.

From: Pranav Desai <pranavadesai@dont-contact.us>
Date: Wed, 30 Aug 2006 17:22:13 -0700

On 8/30/06, Adrian Chadd <adrian@creative.net.au> wrote:
> Try to keep this just onto squid-dev.
>

sure thing.

> On Wed, Aug 30, 2006, Pranav Desai wrote:
> > Hello,
> >
> > For this patch I have to use the following structures to store the
> > timestamps.
> > ConnStateData (for clientIn/Out)
> > HttpStateData (for serverIn/Out)
> > StoreEntry (for diskIn/Out)
> >
> > With this is becomes kind of difficult to present the result in one
> > place. Do you think its possible to use StoreEntry struct for
> > everything, since it seems like the all the above structs use
> > StoreEntry.
>
> Rightio. The main reason to not increase the size of StoreEntry
> is that it'll blow out the memory footprint of your cache.
> You could easily double the size of StoreEntry.
>
> So I'd suggest using storeIOState for diskIn/Out. Its nice and
> ephemeral. :)

What about the others, client and serverIn/Out ? are those the right ones ?
Also, are the location of the profile points correct, since that would
be important for getting accurate info.

>
> Also: please consider using access/store.log - or create a new
> logfile using the logfile.c routines - as cache.log is written
> in a simple but potentially easily-bottlenecked method.
> The latest snapshots of Squid-2.6 use an external process to write
> access/store logs (ie, logs written through the logfile.c
> code) and this'll write out very quickly.
>
> A profiling log wouldn't be a bad idea! You'd do it this way:
>
> Global:
> Logfile *f;
>
> Startup:
> f = logfileOpen("/tmp/profile.log", 1, 1);
>
>
> To write profiling logs:
> logfileLineStart(f);
> logfilePrintf(f, "stuff, to print, printf style", printf-style-arguments);
> logfilePrintf(f, "and the rest of the line..\n", more-printf-arguments);
> logfileLineEnd(f);
>
> .. then during shutdown:
>
> logfileClose(f);
>

Sounds good ... this should work out perfectly, I think.

-- Pranav

>
>

-- 
------------------------------
http://pd.dnsalias.org
Received on Wed Aug 30 2006 - 18:50:18 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:03 MDT