Re: Chunked mempools, a first verdict

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Thu, 3 May 2001 13:09:50 -0600 (MDT)

On Thu, 3 May 2001, Andres Kroonmaa wrote:

> This sounds kind of weird if you look at it from a perspective that
> this is just a memory allocator. libmalloc, and UpdateTime?? ;-)

A memory allocator that supports rate stats has to have access to
current time. A smart allocator would let an application to update
current time in order to reduce overheads, while also implementing
internal updates as an option. I do not see anything wrong with this.

A library that uses only internal clock is actually worse
(performance-, design-, and feature-wise) than a library that allows
the application to tell the current time.

> Probably then it would make more sense to ask OS for time
> internally, say every 1K-100K alloc calls?

I disagree. If we are talking general interfaces here, imagine that
you have 20 libraries, each calling their own getCurrentTime()
functions at random times. Not a very good design.
 
> Not wrong, but averaged over a shorter timeframe than expected.

Yes, that is what I meant to say, sorry.

> I thought mempool stats are mostly for people, developers and alike.
> If you are the only user, then such approach is lovely because you can
> pick the "averaging" timeframe by your browser's refresh button.

Unless there are two admins unknowingly competing with each other.

If this feature is important, let's support it in addition to the
interval-based rates.

An alternative would be to reset the stats only if rest_stats_min time
has elapsed since last rest.

Also keep in mind that reseting something based on cache manager input
may be blocked on the premise that Duane and Henrik(?) do not want any
new actions added to the cache manager. Reset is an action, albeit
trivial.

> And if you have scripts doing periodic polls, then probably from them
> you'd get much better idea about the rates and all.

Sure, but the data scripts collect is not necessarily visible
immediately. I want to use my browser now and the stats archive at the
end of the day/month/year.

> Then we are right into arguing what time averages to keep, and how
> to present them decently. Could also configure averaging time in
> squid.conf and let periodic cleanup event do the checkpointing.

The stats cycle should be a parameter, of course. No reason to argue
about it; just use the value you are comfortable with. It can be even
disabled/undefined by default (so that we do not argue about
defaults :).

Alex.
Received on Thu May 03 2001 - 13:09:59 MDT

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