Chunked memory allocator

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Fri, 28 May 2010 01:47:10 +0200

It has come to light that the chunked allocator have a couple of
fundamental design issues.

The primary is that free space management becomes overly complex,
causing significant performance issues.

The second is that you can not really disable the use of pools by
configuration, even if we claim this in squid.conf. The only way to
control this runtime is by setting the undocumented(?) MEMPOOLS
environment variable or by running under valgrind. I suspect the main
effect of trying to disable or tune down usage of pools via squid.conf
today is only significantly worsened performance.

As I see it we basically have two choices

a) Remove the memory pools config parameters from MemPools & squid.conf
+ related "impossible" free space reclaim code.

b) Revert to the older much simpler pooled design.

The main benefit of the chunked allocator is that it can pack data more
efficiently than malloc() taking benefit of our typed allocations.

In terms of fragmentation reduction there is very limited benefits

And there is obvious drawbacks in free space reclaim efficiency.

Regards
Henrik
Received on Thu May 27 2010 - 23:47:16 MDT

This archive was generated by hypermail 2.2.0 : Fri May 28 2010 - 12:00:11 MDT