Nginx community, i've recently switched to this awesome software which has performed admirably under load testing.
I host a php/mysql driven site that with each page view serves results from multiple external xml feeds in realtime. Once we have the XML data we cache results to reduce load.
I run nginx / php5-fpm / memcache and APC. Site gets > 100,000 searches per day. Each query takes between 1 and 4 seconds depending on the search. So as you can imagine the processes don't open and close as quickly as some more basic php sites. Server load is around 3 average for a quad core box. So OK...
But i wanted your expert opinion on how to check, test and verify my config params for nginx and php5-fpm. I want to be 100% sure i haven't allocated too many processes. So without pasting my entire config, i will show just the bits i'm concerned i wish to check with you guys.
php5-fpm tweaks
Concerns - is max_children / start servers too high? Would they take up CPU processes wasting resources?
pm = dynamic
pm.max_children = 30
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 30
pm.max_requests = 511
listen.backlog = 1024
Worker_processes 4
worker_connections 8192
fastcgi_params
Concerns - is my fastcgi_buffers too much? The reason why i set them high is that each XML result can contain a lot of data.
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
Even under load, memory usage only reaches about 45% so perhaps i'm wasting an opportunity to cache more things in memory.
Thank you