php-fpm参数调优方案(原文PHP-FPM on highload tips)

Posted Posted in Web, 经验, 菜鸟, 运维

php-fpm进程设置多少合适,设成动态还是静态?VPS/云主机只有1GB内存,网站运行经常卡机怎么办?

下面是摘自Google讨论话题的翻译内容:《 PHP-FPM on highload tips

When you running a highload website with PHP-FPM via FastCGI, the following tips may be useful to you

如果你的高负载网站使用PHP-FPM管理FastCGI,也许下面这些技巧对你有用

1. Compile PHP’s modules as less as possible, the simple the best (fast);

尽量少安装PHP模块,最简单是最好(快)的

2. Increas PHP FastCGI child number to 100 and even more. Sometime, 200 is OK! ( On 4GB memory server);

把你的PHP FastCGI子进程数调到100或以上,在4G内存的服务器上200就可以(建议压力测试来得出自己服务器合理的值) ….[阅读全文]