⚡ WordPress · Client-side · No data sent to server

PHP-FPM Calculator

Size your PHP-FPM pool from your server RAM in seconds. Get pm.max_children and the full pm.* settings, plus a ready-to-paste pool config. Runs entirely in your browser.

Total physical RAM available on the server.
MB
For the OS, MySQL/MariaDB, web server, Redis, etc. Typically 20–30% of total RAM.
MB
Memory one PHP-FPM worker uses on average. Typical WordPress: 40–80 MB.
dynamic suits most WP sites · ondemand saves RAM on low traffic · static is fixed and predictable.
php-fpm pool config
 ✓ Copied! 
How it works. pm.max_children = available RAM ÷ average process size. start_servers ≈ 25% of max, min_spare ≈ 25%, max_spare ≈ 75%. Everything is computed in your browser, and nothing is sent anywhere.

About the PHP-FPM Calculator

The PHP-FPM Calculator works out optimal PHP-FPM process manager settings based on your server's total RAM, the memory you reserve for other services, and the average memory each PHP process consumes. It helps sysadmins, WordPress hosts, and developers size their FPM pools so the server uses available memory efficiently without swapping or crashing under load. Everything is calculated instantly in your browser, with a ready-to-paste pool config block as the output.

How it works

  1. Enter your server's total RAM, the RAM you want to reserve for the operating system, database, web server, and other services, and the average memory a single PHP process uses (commonly 40-100 MB for typical PHP/WordPress workloads).
  2. Choose your process manager mode (dynamic, ondemand, or static); the calculator derives pm.max_children by dividing the available RAM by the average process size, then sets sensible start, min spare, and max spare values.
  3. Review the calculated available RAM, peak memory usage, and individual directives, then copy the generated pool configuration block straight into your PHP-FPM pool file.

Features

  • Calculates pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers, and pm.max_requests in one step.
  • Shows available RAM after reservations and estimated peak memory usage so you can confirm settings fit your server.
  • Supports dynamic, ondemand, and static pm modes for different traffic and resource profiles.
  • Outputs a clean, ready-to-paste pool configuration block, no manual editing required.
  • Runs 100% client-side with no signup, no data sent to a server, and no cost.

Frequently asked questions

How is pm.max_children calculated?

It uses the standard formula: available RAM divided by the average PHP process size. Available RAM is your total server RAM minus the memory reserved for the operating system, database, web server, and any other services. This gives the maximum number of PHP worker processes your server can run before risking memory exhaustion.

What value should I use for average process size?

Use a realistic average of how much memory one PHP-FPM worker consumes under your workload. For lightweight PHP this can be 30-50 MB, while WordPress sites with many plugins often run 60-120 MB per process. The most accurate way to find it is to run your app under load and check the resident memory (RSS) of your php-fpm processes, then take the average.

Dynamic, ondemand, or static: which should I use?

Dynamic keeps a configurable number of idle workers ready and scales between min and max as traffic varies; it is the common default for general-purpose servers. Ondemand starts no workers until a request arrives and shuts idle ones down, which saves RAM on low-traffic or memory-constrained servers at the cost of slight cold-start latency. Static keeps a fixed number of workers always running, giving the most predictable performance for high, steady traffic where you want to dedicate RAM to PHP.

Where do I put these settings?

Paste the generated directives into your PHP-FPM pool configuration file, typically found at /etc/php/8.x/fpm/pool.d/www.conf (the path varies by PHP version and distribution). After editing, restart or reload the service with something like systemctl reload php8.x-fpm for the changes to take effect.

Why does my server run out of memory?

It usually happens when pm.max_children is set too high for the available RAM, so under heavy traffic the combined worker memory exceeds what the server has and it starts swapping or the OOM killer terminates processes. Setting max_children based on actual available RAM and average process size, as this calculator does, prevents that by capping workers at a level the server can support.

What does pm.max_requests do?

It sets how many requests a single worker handles before it is respawned. Recycling workers periodically guards against memory leaks in PHP code or extensions by releasing accumulated memory back to the system, helping keep long-running pools stable.