Welcome! Log In Create A New Profile

Advanced

Help me test and verify my config

June 23, 2012 08:23PM
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
Subject Author Posted

Help me test and verify my config

bp1000 June 23, 2012 08:23PM

Re: Help me test and verify my config

Mike Dupont June 24, 2012 02:50AM

Re: Help me test and verify my config

Shankar Dhanasekaran June 25, 2012 12:22AM

Re: Help me test and verify my config

bp1000 June 26, 2012 12:34PM

Re: Help me test and verify my config

Mike Dupont June 26, 2012 03:44PM

Re: Help me test and verify my config

bp1000 June 27, 2012 10:19AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 313
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready