Skip to main content

Insight · Hosting, Servers, CDN & Caching

Choosing PHP-FPM process models for different load profiles

Static, dynamic, and on-demand distribute startup time, base memory, and responsiveness differently; the choice depends on parallelism and available RAM.

"Choosing the appropriate PHP-FPM process model" is considered here from the perspective of "Runtime and Capacity Model." For system administrators and web developers, "Load History" and "Too Many Workers" are particularly important.

Published: 3 min read · Author:

When is static, dynamic, or on-demand appropriate for the actual load profile in PHP-FPM?

Static reserves workers for consistently high loads, dynamic adapts to a typically fluctuating pool, and on-demand saves idle time for rarely used pools. `max_children` follows the available RAM divided by the measured peak usage with operational reserves.

Process memory

  1. Measure memory, runtime, and parallelism of critical requests under representative data sets and load patterns.

  2. Define a safe RAM budget, operational reserve, and desired startup behavior for each separate pool.

  3. Test the selected model under peak load, idle phase, and restart, and fine-tune it based on queue and memory settings.

Too many workers

  • Too many workers Parallelism exhausts RAM and leads to swap or process terminations, even though individual requests may appear normal.

  • Pool too small Requests wait in the queue, even though CPU and RAM still have reserves and an adjusted worker budget could process them.

  • Incorrect Profile – On-demand generates avoidable startup costs under continuous load and regularly extends the initial requests of each new worker.

Use Case: “Too Many Workers”

A rarely used administration pool can start on demand, while the public pool handles a constant load. Both receive separate budgets; the number of public workers is derived from measured peak RAM, not from a default value.

Load History

Test criterion

Load History

Parallelism and idle periods are derived from actual requests instead of average values.

Test criterion

Process memory

Peaks per worker are measured under representative paths, data volumes, and runtimes, not just during idle periods.

  • Startup Costs – Rare pools may be started; critical paths require available workers.

Startup Costs

Control signal

Signal 1

Active, waiting, and maximum allowed workers in the load profile.

Control signal

Signal 2

Memory per process, queue time, and process restarts by pool and representative request class.

What to check before and after "Choosing the appropriate PHP-FPM process model"

A relevant follow-up question answered Use Redis when object caching actually provides a benefit"When does Redis as an object cache truly improve an application instead of just making it more complex?"

A second connection for "Choosing the appropriate PHP-FPM process model" leads to Differentiating PHP-FPM problems between code errors and resource limits. This article focuses on the question, "How do you distinguish between a code error and exhausted process resources in PHP-FPM?"

If you want to practically implement "Choosing the right PHP-FPM process model," you can refer to Robust Website Systems This article focuses on "Runtime and Capacity Model" and "Load Profile."

Conclusion: Choosing the right PHP-FPM process model

The process model follows the load profile and memory limit. Only measurement makes `max_children` a reliable capacity decision.

Sources and Further Information

The following sources document the technical and methodological guidelines used for "Choosing the right PHP-FPM process model."

Key Thesis

Static is suitable for stable high loads with reserved memory, dynamic for fluctuating standard loads, and ondemand for infrequently used pools. Max_children is derived from measured process memory and a safe RAM budget.

What This Is Not About

Static, dynamic, and ondemand are not quality levels and must not be selected without a memory budget.

What it's about

Load pattern, startup latency, and measured process memory determine the model and safe number of workers.

More insights

Hosting, servers, CDN & caching

Select hosting based on actual load rather than marketing packages.

As a separate check, the question "Which load data is a better indicator of hosting performance than advertised package classes?" should be considered as part of the "Choosing the right PHP-FPM process model" checklist.

Hosting, servers, CDN & caching

Meaningfully limit monitoring for memory, CPU, processes, and errors

"Choosing the right PHP-FPM process model" should be supplemented with a separate decision: Which CPU, memory, process, and error signals actually justify an alarm?

Insights Overview

All VELUNO Insights at a Glance

Further analyses on Website Systems, digital visibility, and robust working models.

Practical Implications

Load history: Focus of the next check

The status page and process measurements of a typical peak day provide the necessary data. From this, the pool model and worker budget can be reliably derived.