You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Brian Pane <bp...@pacbell.net> on 2001/06/28 01:54:56 UTC

Re: thoughts on locks

I wrote:
 > For now, I'll hack together a spin lock prototype to see if it yields any
 > measurable improvement in httpd speed.

This is now done, and the short answer is that using a custom
spin lock implementation in place of pthread mutexes in the
pool allocator code doesn't measurably improve the speed of
the httpd.

Thanks to Ian Holsman for benchmarking my prototype code
on a 14-CPU Sparc.   His detailed test results at http://webperf.org/spin/
show that CPU usage and throughput are substantially the same
for the spin lock prototype as for the standard, pthread_mutex_t-based
locking implementation.  (The test case used mod_include with
multiple included files per request in order to put more strain on the
pool allocator.)

Based on these results, it's not worth trying to add spin locks as
an option in the APR lock API.

--Brian