Re: mempool patches

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Mon, 24 Aug 1998 16:43:08 -0600 (MDT)

On Tue, 25 Aug 1998, Stephen R. van den Berg wrote:

> Alex Rousskov wrote:
> >The extra memory overhead for keeping mempools stacks is usually a few KB
> >only, negligible for any reasonable configuration. I do not have any hard
> >numbers for fragmentation, but my guess it is not a big problem with a good
> >malloc library.
>
> I would guess it to be more of a problem than you'd suspect, especially
> on long running (like >4 months without a restart) squids.

The run duration is irrelevant. As you noticed yourself, the memory growth
levels off after the warm-up period. After that, there is no additional
fragmentation as far as memory pools are concerned because virtually no new
memory is allocated (That is one of the reasons why Squid has memory pools!)

If your patch maintains a linked list of allocated pointers (as your reply
implies), then there is no difference in terms of accounted memory usage with
the current model I guess, and your overhead accounting needs to be adjusted
for those pointers in the lists. Otherwise, the only difference then is that
you may have less fragmentation during warm-up period. The price, is, of
course, un-shrinkable pools with no upper limit (you probably want to modify
the squid.conf and other places to document that fact).

> But, I guess, the only way to know for certain is to test it.
> I'll see if I can improve on the ifdef and run some tests in the
> old mode and in the new.

Cool. Please post the results when they are ready.

Alex.
Received on Tue Jul 29 2003 - 13:15:52 MDT

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