Business system structure is NGINX+PHP-FPM, the server is 12 core CPU, 16G of memory, the CPU, memory, IO, network utilization is not high, but the QPS is not run up, more than 800 will have a small number of errors and performance degradation, push instant service will jitter. Excluding the dependent resources MC, Redis reasons, then the rest is Nginx and php-fpm itself, continue to analyze, nginx with the tengine2.1.2, before the cache when the number of concurrent connection measured to 300,000, QPS1.5 million has not had the problem, that most likely is the PHP-FPM itself has encountered the bottleneck. For PHP-FPM, before the number of processes from 128 to 256, continue to increase is not the way, it may not be the process number of problems, and then many times thinking, decisively follow the Tomcat multi-instance approach to PHP-FPM long instances, to maximize the use of server idle CPU , memory, IO, network , improve the throughput of a single server.
...........
Browse all please click on the operation and maintenance Network Coffee Club Address: PHP-FPM Multiple instances to improve system throughput and server resource utilization
This article is from the "Running Linux" blog, so be sure to keep this source http://benpaozhe.blog.51cto.com/10239098/1936542
PHP-FPM multiple instances to improve system throughput and server resource utilization