Is cPanel's Apache install extremely lightweight?

I'm looking to migrate a lot of our customers to cPanel if it's the right fit. I have a few questions first, I'll start with my first question.

Wordpress is NOTORIOUS for taking 50MB+ per httpd process (look at "top" in linux), but on a system we have running cPanel it's only consuming 4-7MB per process. I'm a very experienced sysadmin with Wordpress and have never seen this achieved before. Is cPanel using an ultra lightweight / trimmed down version of Apache? How are the processes so small?

Lastly, where do I tune apache in cPanel, I notice in the httpd.conf file it says my changes will be overwritten.

Thanks for your help, this has been the most impressive thing I've seen! Here are comparisons to show you the resource utilization from a regular apache install (and tuned) with a default Wordpress site, versus the cPanel install.

Staff Member

Wordpress is NOTORIOUS for taking 50MB+ per httpd process (look at "top" in linux), but on a system we have running cPanel it's only consuming 4-7MB per process. I'm a very experienced sysadmin with Wordpress and have never seen this achieved before. Is cPanel using an ultra lightweight / trimmed down version of Apache? How are the processes so small?

Click to expand...

It likely depends on the configuration of that specific cPanel server. For instance, does it use a particular PHP handler, or are any Apache configuration changes made? By default, cPanel does not optimize Apache from the standard configuration values.

The following documents should be helpful when making changes to the Apache configuration file:

Does CPanel not use mod_php to process PHP? It looks like it might be using SuPHP, DSO or FastCGI instead?

There is no configuration of apache (within httpd.conf or php.ini) that can reduce Apache's memory consumption 800%+. Through research it looks like a PHP Handler difference. "mod_php" is installed by apache by default, but it looks like Cpanel may use suPHP, DSO or FastCGI? I've read FastCGI is extremely lightweight on memory and is likely the contributing factor to this. I'm just trying to help others out. From what I've read this will reduce your apache memory consumption from almost 100MB/per process to under 10MB/process. I am going to test this today, if anyone has any input please feel free to chime in.

cPanel uses EasyApache to configure PHP and Apache, and suPHP is the default selection. You can use the Configure PHP and SuEXEC interface in WHM to change PHP handlers, but of course you must have the handler you desire installed already. You can easily install PHP handlers with EasyApache (in WHM, go to Software >> EasyApache (Apache Update)), which will also show you a good bit of information about how cPanel configures Apache.

If you can't find the option you want inside EasyApache, then you can still install it manually, just make sure to follow the instructions in our documentation. You can find our docs on EasyApache here: https://documentation.cpanel.net/display/EA

Also, for the rest of you I manually installed SuPHP and a default Wordpress install. Apach is down to 7MB/process but upon page visits it launches a "php-cli" process that gets to around 30-40MB/ea, however they are almost immediately terminated. So the memory savings is not as much as I thought it would be, however it does perform a lot quicker (pageloads). It's hard to say which solution is better considering the difficulty of managing SuPHP.