いわマン備忘録

備忘録とちょっとした設定メモや小ネタをUPしたいと思っております。

ApacheのチューニングとPHPの値調整

forkさせて処理するとか、PHP側で並列処理させる時の設定メモ。あくまで自分メモです。httpd2.4系だとチューニングする箇所も増えるし、今後は2.4系がいいのかも。Nginxとの使い分けも視野に入れつつ。

PHP
max_execution_time = 600
max_input_time = 900
memory_limit = 512M
output_buffering = 4096

Apache
Timeout 600
KeepAliveTimeout 15

prefork MPM(2台構成)
<IfModule prefork.c>
StartServers 30
MinSpareServers 15
MaxSpareServers 30
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000
</IfModule>

prefork MPM(1台構成)
<IfModule prefork.c>
StartServers 20
MinSpareServers 15
MaxSpareServers 20
ServerLimit 300
MaxClients 300
MaxRequestsPerChild 4000
</IfModule>