Skip to main content

Is cPanel's Apache install extremely lightweight?

Comments

6 comments

  • cPanelMichael
    [quote="pumpkintits, post: 1638412"> 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?
    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: How httpd.conf Is Processed Custom Directives Outside of a VirtualHost Tag Changes Contained Within a VirtualHost Directive Thank you.
    0
  • pumpkintits
    Hi Michael, 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.
    0
  • Shavaun
    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
    0
  • pumpkintits
    Thanks Shavaun. 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. I'll look into your documentation Shavaun.
    0
  • cypheroz
    This helps I think... .vB
    0
  • storminternet
    Tune your apache settings with the help of below URLs. This should reduce memory usage of your server. [url=http://httpd.apache.org/docs/2.2/misc/perf-tuning.html]Apache Performance Tuning - Apache HTTP Server [url=http://httpd.apache.org/docs/2.2/mod/mpm_common.html]mpm_common - Apache HTTP Server [url=http://httpd.apache.org/docs/2.2/mod/core.html#keepalivetimeout]core - Apache HTTP Server
    0

Please sign in to leave a comment.