Re: pconn's don't use MemPools ?

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Tue, 19 Sep 2000 09:45:03 +0200

On 17 Sep 2000, at 23:05, Adrian Chadd <adrian@creative.net.au> wrote:

> Uhm, whilst reading pconn.c for pure interest, I noticed that it isn't
> using a Memory Pool. I'm guessing that it should be.

 I'm wondering what makes the basis for decision on when to use memPools
 and when not to. I've also noticed that use on Pools is quite inconsistent.
 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.
 the rest is left for libmalloc to handle.
 It would be nice if someone would clarify when shold we use pools and
 when not.

> If someone happens to beat me to the 5 minutes worth of work it'd take
> to fix this, it would be very appreciated. :-)

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

> (not to mention the other places you can find mempools still not being
> used, but hey, thats a different kettle of fish...)

 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.

 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?

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Tue Sep 19 2000 - 01:47:54 MDT

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