Re: pconn's don't use MemPools ?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 19 Sep 2000 11:13:34 +0200

Andres Kroonmaa wrote:

> I'm wondering what makes the basis for decision on when to use memPools
> and when not to.

In theory pools should be user wherever a fixed size structure is
managed. However not all of the old baggage has been converted, and
sometimes people are a bit too lazy to use the pools construct.

> I've also noticed that use on Pools is quite inconsistent.

Are you referring to the two methods available (direct usage, or via
Mem.c)?

> I have come to conclusion that pools are used only for requests that will
> be always the same size, and used often enough to get a good hitrate.

That is where they make the most benefit.

> It seems to me that pconn.c uses very small allocations, does it
> matter if it is used with pools?

For the memory usage statistics it matters.

> looking at xmalloc_stats, it doesn't look pretty. awful lot of
> allocations are done per request. I believe its xstrdup's mostly.
> There are some hotspots though, spikes in otherwise even
> distribution. Makes me feel that these should be allocated via pools.

Many are, but not all.

> on the same note, can someone explain me, where and why on earth
> does squid malloc ram in sizes of 120-600KB in one shot?

Good question. Not aware of any such allocations. Can you please make a
trace of where it happens? (can be done by attaching a debugger and
setting a conditional breakpoint in xmalloc or whatever the statistics
enabled version is called)

/Henrik
Received on Tue Sep 19 2000 - 03:42:00 MDT

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