httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <brian.p...@cnet.com>
Subject Re: [PATCH] remove some mutex locks in the worker MPM
Date Thu, 02 Jan 2003 21:53:23 GMT
Aaron Bannert wrote:

> The patch looks good at first glance. Have you done any testing
> to see how much it improves performance (on UP and MP machines)
> and if it has any effect when APR is build with generic atomics?


Here are the performance numbers that I have.  I ran
httpd-2.1.0-dev on an 8x167MHZ CPU Sun with Solaris 8
(32-bit mode).  The client driver sent a fixed number
of concurrent requests for a 1-byte file (to keep the
time spent in network writes from overshadowing the
results).

I tested with both the SPARC V8+ native atomic ops
and APR's mutex-based default atomics:

50 clients
                              load  %CPU  req/s
standard 2.1.0-dev worker     4.59  0.53  1090
patched w/native atomic ops   4.57  0.53  1097
        w/mutex atomic ops    4.70  0.52  1093

100 clients
                              load  %CPU  req/s
standard 2.1.0-dev worker     4.74  0.54  1070
patched w/native atomic ops   4.69  0.54  1083
        w/mutex atomic ops    4.61  0.54  1067

Basically, the patch results in a slightly higher
throughput with lower CPU load.  That matches what
I'd expect from a reduction of mutex contention.
With the mutex-based fallback implementation of the
apr_atomic API, performance was slightly worse than
the original worker code in the 100-client case, but
faster in the 50-client case.  (The effect of using
my worker patch with the mutex-based atomics is to
increase the number of lock calls while reducing
the amount of time spent in each critical region.
These two effects seem to counteract each other.)

Brian



Mime
View raw message