"More PHP-FPM workers = handle more traffic"
Nope. Each pm.max_children eats 30-60MB. Set it to 50 on a 2GB box and you'll swap-thrash into a death spiral the second traffic spikes.
Math it: (RAM - 512MB for MySQL/nginx) / avg_worker_MB. On 2GB that's ~20 children, not 50.
Fewer workers that never swap beat many that do. A queued request is fine; a swapping box is dead.
Try it tonight.
Root Access Daily
@RootAccessDaily
"More PHP-FPM workers = handle more traffic"
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.