apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cliffwool...@yahoo.com
Subject Re: bucket free lists
Date Mon, 26 Feb 2001 01:54:54 GMT
On Sun, 25 Feb 2001 rbb@covalent.net wrote:

> > Right now I'm trying to
> > figure out a respectably clean way to implement bucket reuse lists to cut
> > down on mallocs/frees.
> Quick question on this.  How bad is the malloc/free problem now?  I agree
> the empty bucket list is a good thing, just wondering how bad we are doing
> right now.

In the grand scheme of things, I doubt it's the worst problem around
(Apache-performance-wise).  Obviously there are *many* variables that go
into determining how many bucket creations and destructions there are per
request... in the simplest of cases for a request in Apache there are only
a handful of buckets created (I don't have exact numbers, but I'd guess
5-10ish).  So it's not too bad for the easy case (where easy case is
defined as serving up a static file via sendfile or even MMAP).

But it only goes up from there.  Worst-case scenarios where we don't have
MMAP or where we're using heavy-duty Apache filters like mod_include can
incur very large numbers of bucket creations/deletions, (with most
bucket types requiring multiple mallocs to create a single bucket).  Large
requests require large numbers of buckets to read (since socket buckets
read into 8KB heap buckets)... same holds true for things like CGI script

At any rate, having a free list ought to help... exactly how much it will
help is yet to be seen and will probably vary widely from one
configuration to another.


View raw message