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

From: Adrian Chadd <adrian@dont-contact.us>
Date: Thu, 31 Aug 2006 07:35:01 +0800

Try to keep this just onto squid-dev.

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. :)

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);
Received on Wed Aug 30 2006 - 17:34:55 MDT

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