Rick asked about PHP-FPM so I thought I'd answer in a separate thread:
Previously Apache would run PHP files using mod_php which used a shared object file so the Apache process would actually execute the script. With PHP-FPM Apache passes execution of the script to another process: the php-fpm service (daemon) so you need to ensure this is running. With Nginx PHP-FPM is the normal way to execute scripts (no mod_php).
I've never done any benchmarking to compare performance, I just updated PHP version one day and my server had switched from mod_php to PHP-FPM. As this seems to be the favoured way of running PHP these days so that's what I use.
Things to watch out for when switching to PHP-FPM:
- Because PHP-FPM is now executing scripts it's this service that needs reloading or restarting to re-read php.ini or clear OPcache (e.g. systemctl restart php-fpm).
- Error output now goes to /var/log/php-fpm/www-error.log.
- The user that scripts are executed as may change, i.e. the user that needs write access to the Moodledata.
This last point was a big issue on my CentOS systems as sites stopped working because PHP was now being run as user php-fpm instead of apache. This is managed by user = in /etc/php-fpm.d/www.conf:
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
; RPM: apache user chosen to provide access to the same directories as httpd
user = apache
; RPM: Keep a group allowed to write in log dir.
group = apache
Beyond the above change in user account, as far as I know there's no effect on Moodle of switching from mod_php to PHP-FPM. I mainly use CentOS and Fedora so some of the above information might be specific to these distros (usernames, log and configuration file locations).