You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/11/25 23:13:01 UTC
bucket max free
So thanks to prodding from Jean-Jacques Clar at Novell, I'm putting in an
apr_bucket_alloc_max_free_set() that just calls
apr_allocator_max_free_set() on the underlying allocator. Now we need to
call that function each time we create an apr_bucket_alloc_t, which
happens in each MPM.
My only question is this:
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.
--Cliff
Re: bucket max free
Posted by Brian Pane <br...@cnet.com>.
On Mon, 2002-11-25 at 14:50, Cliff Woolley wrote:
> 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?
Makes sense to me.
Brian
RE: bucket max free
Posted by Sander Striker <st...@apache.org>.
> -----Original Message-----
> From: Cliff Woolley [mailto:jwoolley@virginia.edu]
> Sent: 25 November 2002 23:51
> 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.
I guess this would be the missing piece of the puzzle, yes.
> 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?
+1.
Sander
Re: bucket max free
Posted by Cliff Woolley <jw...@virginia.edu>.
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?
--Cliff
Re: bucket max free
Posted by Brian Pane <br...@cnet.com>.
On Mon, 2002-11-25 at 14:13, Cliff Woolley wrote:
> So thanks to prodding from Jean-Jacques Clar at Novell, I'm putting in an
> apr_bucket_alloc_max_free_set() that just calls
> apr_allocator_max_free_set() on the underlying allocator. Now we need to
> call that function each time we create an apr_bucket_alloc_t, which
> happens in each MPM.
>
> My only question is this:
>
> 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
Brian