Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running CentOS 64 bit, and jsut found out I am running prefork MPM on my dual quad xeon. I was told worker will give me lower memory usage, and higher performance, since I run a very high traffic website.

If this is true, how do I do it?

Thank you

share|improve this question

3 Answers 3

up vote 12 down vote accepted

Edit: /etc/sysconfig/httpd

Uncomment:

HTTPD=/usr/sbin/httpd.worker

Restart, voila!

share|improve this answer
    
Hi @RafiqManiar, by restart do you mean Apache or the whole server here? –  fuzzybee Feb 25 '13 at 5:04
2  
Restart apache. sudo service httpd restart –  Rafiq Maniar Feb 25 '13 at 8:31

Edited: /etc/sysconfig/httpd

And uncommented:

HTTPD=/usr/sbin/httpd.worker

After restarting httpd (service httpd restart) I get the following error:

Stopping httpd:                                            [  OK  ]
Starting httpd: httpd.worker: Syntax error on line 222 of /etc/httpd/conf/httpd.conf: Syntax error on line 9 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5-zts.so into server: /etc/httpd/modules/libphp5-zts.so: cannot open shared object file: No such file or directory
                                                           [FAILED]

You might need to install php-zts though.

yum install php-zts

After that no more error messages and httpd is starting normally with module worker active.

share|improve this answer

It might be true, the only real way to find out is to test.

This is a compile time option so that would require a recompile of apache. Download the srpm, install it, modify the source, create a patch file, apply the patch file in the .spec file, rebuild the RPM, install the RPM. (That's a very quick description for a somewhat longer process.) Here is a more complete example.

Or you could just download the source, compile it, and install it. Which might be a better choice for testing purposes. I'd go the extra mile and create the RPM. You always want to create a re-producible environment, especially in a very high traffic situation.

share|improve this answer
1  
Worker MPM is available in CentOS and Debian/Ubuntu without recompiling. –  Rafiq Maniar Jan 11 '11 at 9:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.