Optimizing PHP7 with nginx
i know there are tons of articles around the web for such topic, but i really dont like to tune my server just with given figures without understanding it.
basically my server has separate web server & database server (both are 1gb each)
and i also have 2 pools, 1 for my main site/community(wordpress), another for my application(codeigniter) which is on a sub-domain.
the application is going to be using most of the resources i assume (even though its on codeigniter framework which is already very lightweight), as main site is not that large, and on top of that its fastcgi enabled.
so what should be the pools configuration for my setup?
till now i didnt changed the default value, so both pools are running on the same value. but after googling a lot, i think this could be a good setting for my 2 php pools.
For Both site
emergency_restart_threshold 10 emergency_restart_interval 1m process_control_timeout 10s
pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.max_requests = 300 request_slowlog_timeout = 5s slowlog = /var/log/php/7.0/fpm/slowlog-site.log
pm = dynamic pm.max_children = 10 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 4 pm.max_requests = 500 request_slowlog_timeout = 5s slowlog = /var/log/php/7.0/fpm/slowlog-app.log
Please reply here your recommendation guy’s.
thanks in advance.