문제

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)?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top