Developer & Server / CALCULATOR

PHP-FPM Max Children Estimator

Estimate a memory-based starting point for PHP-FPM’s maximum worker count.

Reserve memory for the OS, database and other services before applying a safety margin. Use measured worker memory from representative requests. CPU, request duration, shared pages and traffic patterns can impose tighter limits than RAM alone.

Your calculation

Enter your values below.

Your calculation is not saved.

Use a decimal point. For single values, enter 1500 rather than 1,500.
YOUR RESULT · Calculating…

Ready when
you are.

Enter your values and select Calculate.

Calculated with unrounded values. Display precision follows each result.

Planning estimate only. Measure your actual workload and validate changes under realistic load before applying a server configuration.
THE WORKING

How this calculator works

Reserve memory for the OS, database and other services before applying a safety margin. Use measured worker memory from representative requests. CPU, request duration, shared pages and traffic patterns can impose tighter limits than RAM alone.

The formula

Worker budget = (total GiB − reserved GiB) × 1024 × (1 − margin/100). Workers = floor(budget / worker MiB).

A quick example

With 8 GiB total RAM, 2 GiB reserved, a 20% margin and 100 MiB per worker, the worker budget is 4,915.2 MiB and the estimate is 49 workers.

How to use this calculator

  1. Choose the settings that match your scenario, using the units shown beside each field.
  2. Enter total server ram (gib), reserved system and service ram (gib), measured average php worker memory (mib), safety margin on available ram (%).
  3. Calculate, then review the method and assumptions alongside the results.

A few common questions

Is this a guaranteed safe configuration?
No. Confirm memory behavior and throughput with your application under load, including peak rather than only average use.
What does pm.max_children limit?
It limits simultaneous PHP-FPM child processes available to handle requests; it is not a count of all connected site visitors.

Reference: PHP manual: PHP-FPM configuration

Was this calculator useful?

Report an issue

Recently used