Re: SQUID 1.1.10 available

From: Oskar Pearson <oskar@dont-contact.us>
Date: Tue, 29 Apr 1997 08:58:16 +0200 (GMT)

Duane Wessels wrote:
>
> If you didn't already notice, Squid-1.1.10 is now available.
> - Optimized comm_select() functions (Mark Treacy).
Does this stop the "huge cpu usage" problem?
from these lines:
+ #ifndef LESS_TIMING
      getCurrentTime();
! #endif
it seems so.

By the Way:
We are using NOVM 1.1.9 on our one cache servers here. It is handling very
well, having had about 1.2M connections. Filedescriptor usage isn't actually
that bad.

I would like to put something like the following in the cache code. You
don't need to do it, but I would like some idea as to how to do it:

Basic idea is:
Have a page detailing "peak usage rates" including:
5 minute peak (start time, end time, number of connections)
1 hour peak (start time, end time, number of connections)

The obvious (sort of :) way to do this is:
take the time squid starts up, wait 5 minutes, count number of connections.
after next 5 minutes, do the same thing, take the highest number and record
it.

This is good for "basic idea" info, but my guess is it's not exactly
"statistically correct". For example, your "most used hour" could start
at 30 minutes past the hour and end at 30 minutes past the next.

You could improve it as follows:
Take a minute count, store the "last 60 minute counts". Every hour
you do a "bubble sort" type thing on it, using 5 variables,
biggest-so-far, temp count, position, biggest start time, biggest end time:
take the first 5 minutes, add them up. keep the value in "biggest-so-far"
copy this variable to "temp"
take the value for minute[position-5] and subtract it from temp
position++
take the value for minute[position] and add it to temp.
is it bigger than biggest-so-far? If so, change biggest-start-time and end-time
and change the value of "biggest-so-far".

You could use the same method for the "1 hour" values. You could even
allow someone to specify the time to do it over and then compute it on the
fly.

You could, of course, do this with an external process (doing a "cache_info"
query).

Any better ways of doing it?

        Oskar

=============================================
'experience made art, but inexperience luck.'
=============================================
Received on Tue Jul 29 2003 - 13:15:41 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:18 MST