This website uses cookies in order to offer you the most relevant information and services online. Please accept cookies for optimal performance.
Learn More

Boost PHP Processing with PHP-FPM

Sep 13, 2019

PHP-FPM is an Apache module that brings much better performance (approximately 300%) for PHP script processing compared to other preceding modules like suPHP, CG or DSO (Dynamically Shared Object). FPM stands for FastCGI Process Manager.

Illustration of PHP-FPM and its Components in Web Architecture

The major change in the management of PHP processing comes with the introduction of Workers Processes which can be spawned from a Master Process that receives the request. The processing happens in parallel then and the output is served back to the Web Server (Apache/NGINX). The spawning of Worker Processes happens in three ways:

  1. Static: Opted for high-traffic sites where a fixed allocation of Workers will reduce computing for Worker-allocation. Incorrect configuration with respect to available server capacity may result in timeout or gateway error (403 or 504 HTTP status codes).
  2. Dynamic: Opted for sites where traffic can vary and multiple sites compete for resource allocation.
  3. On-demand: Opted for low-traffic sites.

The important feature of PHP-FPM is an adaptive process spawning where Workers are dynamically spawned and killed on-demand.

-FPM is important for good performance of the site(s) hosted on your VM (Virtual Machine) - Request limit, Timeout limit and Workers limit. You can install and run PHP-FPM on any VM with at least 2GB RAM or at least more than 30MB RAM per site on the VM. All Batoi Virtual Machines come with PHP-FPM support.

Further Learning:

  1. The PHP-FPM Home Page: https://php-fpm.org
  2. The Official PHP Documentation: https://www.php.net/manual/en/install.fpm.php
  3. cPanel Management Guide: https://documentation.cpanel.net/display/78Docs/PHP-FPM
  4. The Official Guide for PHP-FPM with NGINX: https://www.linode.com/docs/web-servers/nginx/serve-php-php-fpm-and-nginx/

Need our assistance? We are available with you.

Existing Customer?
Get Support
Talk To Consultant?
Get An Appointment
Contact Us

Batoi global offices and contact details

Stay Connected

Join our community, newsletters, and social media.

Batoi's new website is in the process of release and will be completed by the end of October 2020. Please bear with us.