https://tideways.com/tools/fpm-configuration-calculator https://spot13.com/pmcalculator/

Есть вот такие замечательные калькуляторы оптимального конфига php-fpm. Но это же надо САМОМУ писать сколько у тебя оперативы, сколько MB на процесс уходит. А нормальный разработчик пишет пару часов скрипт, который оптимизирует ЦЕЛЫХ 5 минут работы :)

https://gist.github.com/ancient-web/4f817ee5541b2831445e2cec958b8571

fpm-tune.sh — recommend optimal php-fpm pool settings for the current container

Run this script INSIDE the container that runs php-fpm, ideally while it is handling real traffic (or during a load test) so the worker memory samples are representative.

Usage: ./fpm-tune.sh [options]

Options: --mode static|dynamic|ondemand|auto pool to recommend (default: auto) --samples N times to sample worker memory (default: 3) --interval S seconds between samples (default: 1) --memory-limit MB|N% override detected cgroup memory limit --overhead MB|N% RAM reserved for linux/db/other (default: auto from cgroup) --per-process MB|N% override measured worker memory --json machine-readable output -h, --help show this help

Example (measure for 30s while sending traffic): ./fpm-tune.sh --samples 30 --interval 1

Values ending with % (e.g. --memory-limit 20%) are resolved against the detected memory limit.

https://tideways.com/tools/fpm-configuration-calculator
https://spot13.com/pmcalculator/
Есть вот такие замечательные калькуляторы оптимального конфига php-fpm | Сетка — социальная сеть от hh.ru