httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: bucket max free
Date Mon, 25 Nov 2002 22:50:56 GMT
On 25 Nov 2002, Brian Pane wrote:

> > What should the max freelist size be?  64K?  32K?  If somebody says "it
> > should be configurable," I'm gonna shoot them.  ;)  hehe It probably
> > SHOULD be, but I don't have time to implement that right now.
> I think 16KB may be enough for most general use.  One
> way to find out for sure would be:
>   - Implement your max-free limit
>   - Set the limit to 8KB
>   - Build a prefork MPM, set a breakpoint in the allocation
>     function with gdb, and send some typical requests to the httpd
>   - Keep increasing the limit until it no longer hits the
>     breakpoint after the first request

Well, it just occurred to me that most of the work for doing it
configurably is already there.  There's already a pools-max-free
directive, so if we just have the pools and the bucket allocator share the
same apr_allocator_t, we should be golden.  That means we need an
apr_bucket_alloc_create_ex() that takes an existing apr_allocator_t* as a
parameter.  So we set the allocator's max_free first, then create a pool
that uses that allocator with pool_create_ex, and then create a
bucket_alloc on the same allocator (and under the same limit) using the
new bucket_alloc_create_ex.

Sound good?


View raw message