Is PHP-FPM compatible with the ZendOptimizer?
Yes, it is!
Is PHP-FPM from the accelerator ZendPlatform, xcache, eAccelerator, APC, etc.?
Yes, PHP-FPM's architecture is compatible with any model of shared memory, with which the accelerator can be used for opcode cache. There is just one restriction: all the worker processes, will use the same cache, even if the workers are started under a different uid/gid.
Why do I need to patch the PHP source to use PHP-FPM?
PHP-FPM was created to add additional convenience to the administration. It requires changes to the PHP core itself to allow for these changes.
- Graceful restart of PHP without any losing requests, including updating the PHP binary and/or extensions
- Launch PHP workers with different uid/gid/chroot-environment
- All settings in one configuration file
- Adaptive process spawning, based on the load (TODO)
- Access to real-time performance statistics (TODO)
Other tools such as spawn-fcgi are better for you if you cannot patch PHP yourself. However, it only has a limited selection of features and requires customized scripts if you want multiple FastCGI pools.
Why do I need to run PHP-FPM as root? It is safe?
Running PHP-FPM with root priviledges makes only sense if you plan to handle php requests with different uid/gid. For example, for different websites in shared hosting. In order for this to work, the master process of PHP-FPM has to be executed with root. So it can run worker processes with another uid/gid. This is quite safe because master process itself is never a processing any requests itself.
In any case, PHP-FPM never performs queries under as the "root" user.
Does the PHP-FPM to speed processing of requests?
No, it does not really change anything. However, if you use some of the special features, the performance of certain queries can be accelerated. See Features.
Will you see a performance gain on my site by moving from mod_php to PHP-FPM?
Usually, when running on a server with a lot of free memory, the gains in productivity from the transition to the PHP-FPM is likely to be small. But if memory is a valuable resource, the increase can be substantial, in some cases up to 300-500%. This may be due to the fact that nginx + PHP-FPM, typically use less memory than Apache + mod_php and file cache OS will be markedly better at the expense of liberated memory.
Will there be a PHP-FPM is included in the official PHP?
I hope so. At this time, the license code PHP-FPM - GPL. So now the code can not be accepted in php (license is BSD-like). This is a temporary measure, chosen to simplify the development. Once the code will complete functionality, you will be adaptive spawning and a few other things, the license will be replaced for compatibility with PHP. After this code PHP-FPM will be formally presented to the team of developers php and proposed for inclusion.
The license has now been changed to a BSD-like license. This means it can be included in PHP or in PECL. We're already in contact with the PHP and PECL team to try to get it included or portions of it included in PHP core (and possibly have hooks and a utility for the process management portion live outside of PHP core, so it can move faster and be independent of PHP releases)