Question

How well does APC (latest version 3.1.5) work with PHP FastCGI (especially PHP-FPM)?

There are a lot of articles stating that they don't work together pretty well but these references are also very old (like 2009).

Also, can the opcode cache be configured separately between PHP-FPM pools?

And finally what's the best configuration for sharing the opcode cache between FastCGI processes (mmap'ed /tmp/apc.XXXXXX, shm mmap'ed /tmp/apc.shm.XXXXXX or anonymous mmap'ed /dev/zero)?

Was it helpful?

Solution

Yes, APC works with php-fpm. It was questionable when fpm was still in patch form but we are using it on production client systems without issue now that it is part of the official php build. If you use the fpm built into php (php 5.3+) you can pass php config paramaters in from your php-fpm config file. That way you can setup multiple init scripts and config files with different options. /dev/shm is the easiest way to share between processes and works without having to do anything special.

OTHER TIPS

While I cant answer the specifics, I can tell you I have used APC with PHP via FastCGI. As to how well it worked I am not sure, but I did see a performance increase.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top