You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Chris Mason <cl...@osfmail.isc.rit.edu> on 1998/12/10 02:07:37 UTC

(unix) threading and caching default handler

Hello,

This is a feeler to see who's working on similar tasks, and who might be
interested on some recent change's I've made to apache 1.3.3.

I'd like to multithread v1.3.3.  Is there anyone currently working on this
and willing to share?  If not, anyone interested in helping/testing/porting?
I read that it is planned for v2.0, but wasn't sure what the time frame was.

I've written an in memory file cache for the default_handler() in
http_core.c.  It works via shared mmap'd regions and DCE pthread mutex
locking.  Filenames are stored/retrieved via a hash table, and cache data is
stored via a bucket system (sized with config directives).  The code is
still very beta, and has only been tested on DEC Unix v4.0d

A replay of our access logs through a test server gave ~40% cache hit rate.
To test performance, I setup 20 readers doing a replay of yesterday's access
log (CGIs removed).  Without the cache, I averaged 300 hits per second and
about 6 MB/s transfer rate.  With the cache, I averaged 400 hits/s and about
7.5MB/s transfer rate.  File sizes ranged from < 100 bytes to over 1MB.
Tests were on a 533mhz alpha with 1GB of ram over an NFS filesystem (crappy,
I know).  System load during both tests hovered around 28.   The cache size
was about 50MB.

The results are not as good as I had hoped, but that server is giving most
of its ram to filecache.  If people are interested, I can make the code
available.  Right now, it is a patch to http_core.c.  I'm open to
suggestions if people think it belongs somewhere else.


-chris


Re: (unix) threading and caching default handler

Posted by Ben Hyde <bh...@pobox.com>.
Bill Stoddard writes:
...
>A couple of us at IBM are working on a pthreads port of Apache 1.3.4-dev.
...

Oh!  Anything so I could stop debugging module threading problems on NT!

Port to Wine?  - doesn't do threads on FreeBSD, darn.

   - ben

"Communication rests on a foundation of mutual perspective-taking, the 
mechanics of which are poorly understood."

Re: (unix) threading and caching default handler

Posted by Bill Stoddard <re...@ibm.net>.
Chris Mason wrote:

> Hello,
>
> This is a feeler to see who's working on similar tasks, and who might be
> interested on some recent change's I've made to apache 1.3.3.

>
> I'd like to multithread v1.3.3.  Is there anyone currently working on this
> and willing to share?  If not, anyone interested in helping/testing/porting?
> I read that it is planned for v2.0, but wasn't sure what the time frame was.

A couple of us at IBM are working on a pthreads port of Apache 1.3.4-dev.
(inspired by Dean's earlier pthreads work).  We will release the code in early
January (I'd like to get it serving pages first :-).  Maybe we can use the
pthreads port as a base for developing an Apache Portable Runtime (APR) layer.

Bill Stoddard
stoddard@raleigh.ibm.com



Re: (unix) threading and caching default handler

Posted by Dean Gaudet <dg...@arctic.org>.

On Wed, 9 Dec 1998, Chris Mason wrote:

> Hello,
> 
> This is a feeler to see who's working on similar tasks, and who might be
> interested on some recent change's I've made to apache 1.3.3.
> 
> I'd like to multithread v1.3.3.  Is there anyone currently working on this
> and willing to share?  If not, anyone interested in helping/testing/porting?
> I read that it is planned for v2.0, but wasn't sure what the time frame was.

See the apache-2.0 CVS respository, there's already a multithreaded port
there.

Dean