AamAadmiParty / india-standalone-drupal

A drupal based website that currently powers http://aamaadmiparty.org/, the "main" site. It is different from other AAP websites in drupal for primarily large scale email sending capabilities, among many other small things. (This website is a contender for merging with 'regional-domainsite-drupal' reposiroty when the latter is ready)
GNU General Public License v2.0
0 stars 1 forks source link

Install and configure APC on both the servers currently in use #23

Open sumeetpareek opened 11 years ago

sumeetpareek commented 11 years ago

Install and configure APC on both the servers currently in use

sumeetpareek commented 11 years ago

I had installed APC on the web-01 server (ssh -i /home/batuk/.ssh/aap-prod2.pem ubuntu@54.251.248.135') first.

But this is the server where we have the NFS mounted filesystem that syncs when there are file changes on the other server web-02 (ssh -i /home/batuk/.ssh/aap-prod2.pem ubuntu@54.251.248.135') and I had no permissions to write in the webroot. > Which is something that I needed to test the apc.php file and figure what configurations are being used and change them according to our need.

Proceeding with the other server now.

sumeetpareek commented 11 years ago

When checking APC usage here - http://www.aamaadmiparty.org/apc.php I noticed that varnish was caching this file. I have excluded this file to be cached from varnish by updating the settings as below

 # Do not cache these paths.
  if (req.url ~ "^/status\.php$" ||
      req.url ~ "^/update\.php$" ||
      req.url ~ "^/apc\.php$" ||
      req.url ~ "^/admin$" ||
      req.url ~ "^/admin/.*$" ||
      req.url ~ "^/flag/.*$" ||
      req.url ~ "^.*/ajax/.*$" ||
      req.url ~ "^.*/ahah/.*$") {
       return (pass);
  }

This is only done on web2 server and needs to be done on all other varnish-fied servers

sumeetpareek commented 11 years ago

The PHP memory used as seen by turning on the devel module settings, and check for AUTH users from admin login, is -

Home page = 83 MB

screenshot_2013_09_17_001

Inner news page = 77 MB

screenshot_2013_09_17_002

These values are too huge and just not acceptable. We need to bring them down my cleaning the modules - #19 and other steps.

For now, I am setting the APC cache size at 64M and proceeding.

sumeetpareek commented 11 years ago

The APC settings we are using now are as below

extension=apc.so
apc.enabled=1
apc.enable_cli=1
apc.shm_segments=1
apc.shm_size=64M
apc.stat=1
apc.ttl=7200
apc.user_ttl=7200
apc.gc_ttl=7200
apc.max_file_size=1M
apc.num_files_hint=1000