Hi everyone,
I am currently working on the scalability of a site and had APC installed. I'm still new at this and just followed some tips on setting it up from this site: http://andrewdunkle.com/how-install-apc-alternative-php-cache-drupal-7
I followed and applied the settings for the shm-size etc. so I'm not sure what I'm currently doing wrong.
The apc.php file is also on our root domain. (http://www.atheistrepublic.com/apc.php) What I'm wondering is why the graphs are changing everytime i refresh the apc.php page?
Is that a normal thing or I have a setting I didn't add?
If you refer to this: http://andrewdunkle.com/apc.php even if you refresh it, the graphs don't change.
PS: Our start time is also different everytime I access this page and the uptime is always at 0 minutes.
Hope you guys can help :)
Thanks!
Comments
PHP running as CGI or FastCGI
So, it seems that for the first site (where the graphs change), the server is running the site with PHP as CGI or FastCGI. In such a configuration, each process has its copy of the APC shared memory.
Whereas the second site (graphs do NOT change), is running as mod_php or php-fpm. In those configurations, APC is shared across all processes.
If you put a file like this in each server's webroot:
<?phpphpinfo();
call it phpinfo.php, and then load it in the browser, you will see the mode for PHP in each server, to confirm my guess.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Thanks for the reply
I just confirmed that our site runs using cgi/fastcgi.
So what does that entail? How do I get an average and check settings for APC on our server? I'm not even sure if it's working right for our site since our load speed keeps on increasing
Switch to mod_php
Your best bet is to switch the server's PHP mode to Apache's mod_php. Plesk can do that (if the host has that as an option).
High load can be due to APC, or can be due to a multitude of other reasons.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
That sounds like a viable
That sounds like a viable option. I'll check and see how I can do that on our server. Can you link me to some references on mod_php compared with cgi/fastcgi?
I think this is due to APC which I may have misconfigured or something :P
Thanks again kbahey~ appreciate the help :)
CGI vs. FastCGI vs. mod_php
I wrote an article a while back about FastCGI vs. mod_php. The trade off was acceptable in most cases, even with the overhead of each process having its own APC shared memory copy.
Here it is: Apache fcgid: acceptable performance and better resource utilization.
Note that FastCGI/fcgid are not the same as CGI. CGI is totally outdated and a remnant of the mid 1990s.
You are running Plesk, so it is fairly easy to change the PHP mode in there.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.