I have a dedicated server currently hosting more than a dozen sites running from a single install of drupal (MultiSite).
I have installed APC on the server to attempt to alleviate this include overhead. My current configuration looks like
[apc]
apc.enabled = 1
apc.include_once_override = 1
apc.shm_size = 32M
apc.stat = 0
apc.ttl = 0
The issue is when I install the packaged apc.php to one of the site's document root, I only ever see something like below
http://screencast.com/t/NTY2NmM4MmI
The only file being cached by apc seems to be the above apc.php file itself, and none of the drupal files (ie. all.module files) from that central location. Further, the caching is only out of 30M, not the 32M I specified in the config above (though I believe this is due to me needing to recompile APC to work using shared memory instead of mmap memory).
Can someone point me in the right direction to getting my central application code cached by APC?
Comments
Is that apache prefork with
Is that apache prefork with mod_php or worker with fcgi?
(Be careful with apc.stat=0. Every time you update a module or change settings.php you have to flush the cache. And you have to go back to apc.stat=1 while you install new sites. The first time you forget you'll be looking at a white page of death or similar. That shouldn't be causing your problem though.)
PHP5 is running via suphp
PHP5 is running via suphp using suExec.
I don't personally use
I don't personally use apache, but I know that in some worker/fcgi configurations it spawns a new php process for each request, thus making it impossible to persist an apc cache. Also if you're running a separate persistent process for each user, then each user would have their own apc cache, which might not be practical from a memory standpoint.
See http://www.brandonturner.net/blog/2009/07/fastcgi_with_php_opcode_cache/