Home  >  Article  >  Backend Development  >  linux - 调整php-fpm进程数之后,为什么负载飙升的厉害

linux - 调整php-fpm进程数之后,为什么负载飙升的厉害

WBOY
WBOYOriginal
2016-06-06 20:38:52988browse

2015-01-13 是1个php-fpm主进程,6个子进程。内存使用0.6455G
2015-01-20 是1个php-fpm主进程,30个子进程。内存使用0.4785G

虽然内存利用率和CPU的利用率都上去了,但是负载有点过高了。负载之前从来不过0.1,修改后,负载高的时候直接飙到0.56。这是为何?

系统2核、4GB,该网站流量非常小,不过100 pv 每天,不存在正好今天流量特别大的情况。上面无其他服务。就一个lnmp环境。

linux - 调整php-fpm进程数之后,为什么负载飙升的厉害

回复内容:

2015-01-13 是1个php-fpm主进程,6个子进程。内存使用0.6455G
2015-01-20 是1个php-fpm主进程,30个子进程。内存使用0.4785G

虽然内存利用率和CPU的利用率都上去了,但是负载有点过高了。负载之前从来不过0.1,修改后,负载高的时候直接飙到0.56。这是为何?

系统2核、4GB,该网站流量非常小,不过100 pv 每天,不存在正好今天流量特别大的情况。上面无其他服务。就一个lnmp环境。

linux - 调整php-fpm进程数之后,为什么负载飙升的厉害

维护的子进程增多了 对cpu消耗当然也增加了

修改max_requests参数

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn