I have a high traffic site (we are talking about millions of pageviews per month here) and i am having trouble optimizing php-fpm as each process is using a huge amount of cpu(15% to 99%).My load average is typically 20 at peak times (which is huge).
http://gyazo.com/866d574730def373e6c79e074fd52fcd
My server specs(i upgraded both ram and cpu in an attempt to solve the problem).My site uses just Nginx+PHP-FPM , there is no database or anything else but i use Zend Opcache
nginx version: nginx/1.7.5
PHP 5.5.16 (cli) (built: Sep 3 2014 20:08:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
Dual Xeon E5-2620
16gb of ram
I have many such warning in my logs
WARNING: [pool www] child 15215 exited on signal 15 (SIGTERM) after 319.786619 seconds from start
WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 76 idle, and 338 total children
My php-fpm config
pm = dynamic
pm.max_children = 800
pm.start_servers = 120
pm.min_spare_servers = 80
pm.max_spare_servers = 160
pm.max_requests = 500