httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: some reasons why Apache 2.0 threaded is slower than prefork
Date Fri, 02 Mar 2001 19:42:08 GMT
Ben Laurie wrote:
> Cliff Woolley wrote:
> >
> > On 1 Mar 2001, Jeff Trawick wrote:
> >
> > > This will be very useful, especially if the semantics of the list
> > > operations will enable them to be implemented as lock-free operations
> > > for certain platforms.
> >
> > It's the "lock-free operations" part that I've been stumbling over so far.
> > If we were just talking prefork, it'd be trivial... but keeping it
> > thread-safe AND lock-free is quite a challenge.
> If you could have pools that you guarantee not to share across
> threads...

Our pools expect that you take care of serialization yourself somehow
(like only using the pool on a single thread) until it comes time to
allocate new blocks of storage.  The block allocation code gets mutexes
in a threaded environment.

So if there are tons of mutex requests coming from the block allocation
code (are there?), we could reduce them by giving each thread more
storage up front, or use platform dependent lock free list operations to
manage free blocks.  Both have their costs: storage use goes up, or we
acquire/maintain more platform specific code.  

I'm not really concerned about the platform specific code maintenance. 
Once you get it right, it just works.


View raw message