Trying to track down the cause of some high server load.

Not sure if this has anything to do with it but, in the process manager in whm I noticed about 200 of this process running: /usr/local/apache/bin/httpd -k start -DSSL

Each using about 7.6% of the memory.

I know httpd is apache, but what exactly is that process?

Any ideas?

link|improve this question
feedback

1 Answer

Apache MPM-Prefork launches a new process for each connection. It is as inefficient as it sounds, But unfortunately completely normal.

I never run apache with MPM-Prefork, It is the default for ease of administration.

Apache has two other MPM's available, MPM-Worker and MPM-Event. Worker is multi-threaded and Event is asynchronous.

I prefer Worker, as it is more mature and IMO still offers better performance. Some prefer Event, and say otherwise. Either way better then forking a process every time.

PHP is by default non-thread safe, some would say no matter what non-thread safe! So you can't use regular mod_php with anything other then MPM-Prefork.

You can however use MPM-Worker and serve PHP with FastCGI. I prefer doing FastCGI via PHP-FPM, however with Cpanel it's very easy to do it via mod_fcgi.

You should recompile apache with the easyapache script. Update your Cpanel before running easyapache.

make sure to choose apache 2.2, PHP 5, MPM-Worker, FastCGI, suEXEC

I also choose Suhosin for security, and eaccelerator / Zend optimizer for performance.

once the build is done, you will get a menu to choose how to serve php, chose fcgi!

read more here http://docs.cpanel.net/twiki/bin/view/EasyApache3/ApachePHPRequestHandling

...Or deal with crappy performance.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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