I have no idea if this is going to work, but I did want to at least try to get apache working with my setup using the Worker MPM module. Performance with the worker MPM as opposed to the pre-fork MPM. The worker MPM uses a thread based architecture as opposed to the pre-fork MPM which uses a process based architecture. The architectural differences between the two Multi-Processing Modules means that the worker MPM has a lower memory footprint. The memory difference is substantial enough that performance can be dramatically affected.
The down side to the threaded model is that everything you work with has to be thread safe. There was a time when this was a big problem, but as the threaded model has been around for some time, I'm willing to give it another shot. These are my experiences with installation.
If you already have apache installed, chances are that you have a version of apr and apr-util installed as well. The worker MPM requires that the latest and greatest version of apr and apr-util be installed, otherwise you will get an error about ap_thread_stacksize being undefined. To install the latest and greatest versions, the process is as follows:


1<br /> 2# Build and install apr 1.2<br /> 3cd srclib/apr<br /> 4./configure --prefix=/usr/local/apr-httpd/<br /> 5make clean<br /> 6make<br /> 7make install<br /> 8# Build and install apr-util 1.2<br /> 9cd ../apr-util<br /> 10./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/<br /> 11make clean<br /> 12make<br /> 13make install<br /> 14# Configure httpd<br /> 15cd ../../<br /> 16./configure --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/<br />
The difference between my instructions and apache's is the usage of make clean. Without make clean I was receiving errors that I could not install apr or apr-util in the directory of my choice.
In order to get PHP with the worker MPM running, you have to enable the Zend Thread Safety libraries - by using the line --enable-experimental-zts in your configure script. PHP still has a notice up recommending the use of the pre-fork MPM, but I haven't seen any complaints about the worker MPM anytime recently. I do get concerned about thread safety in some of my optional modules, like imagemagick, but we'll see how it all works out.
I ran a few performance tests with ab - which is a load testing tool included with the apache web server. Strangely - I found that my system actually performed better in pre-fork mode than in worker mode. Static page downloads were pretty quick with either option, but both MediaWiki and vBulletin showed degradation in worker mode. I did come to discover that I really should get a squid server in front of both vB and MediaWiki. Both of these applications under high load would quickly degredate to below acceptable service.
Apache Worker MPM with PHP Interaction
