Skip to main content

Batoi navigation

Boost PHP Processing with PHP-FPM

PHP-FPM is an Apache module that brings much better performance (approximately 300%) for PHP script processing.

LinkedIn X Facebook

Boost PHP Processing with PHP-FPM

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.

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
  2. The Official PHP Documentation
  3. cPanel Management Guide
  4. The Official Guide for PHP-FPM with NGINX

Back to Developers Blog Back to top

Continue reading recent articles in this category.

Modern URL Infrastructure with DYN Microservicelets

A consistent path structure across public pages, private deployments, and SaaS workspaces

Read article

The Need for NoSQL Databases: An Everyday Guide

NoSQL databases are designed to store and manage data differently from relational databases. They do not necessarily use the traditional table-based structure and often do not use SQL as a query language.

Read article

Understanding DMARC and Its Practical Implementation

Protect your domain from email spoofing and phishing attacks with our comprehensive guide to DMARC. Learn the fundamentals, importance, and step-by-step implementation to enhance your email security and brand reputation.

Read article

Explore further with Batoi

Browse practical resources, discover other blog categories, or receive updates by email.

Resources All blog categories Subscribe to updates