I have recently shifted to a 2 server setup where Nginx, Apache Fastcgi and Php-fpm sit on one server while Mysql 5.5 on another. Each server has a RAM on 1GB
Nginx is used as an image proxy to Apache. And apache communicates with Php-Fpm over a socket using FastCgi.
Apache is using MPM worker config (i use the following config)
<IfModule mpm_worker_module>
StartServers 2
ServerLimit 2
MinSpareThreads 50
MaxSpareThreads 80
ThreadLimit 80
ThreadsPerChild 50
MaxClients 100
MaxRequestsPerChild 10000
</IfModule>
Nginx basic config
user www-data www-data;
worker_processes 2;
events {
worker_connections 1024;
use epoll;
}
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 55;
Now when i carry out load tests using both ab and Siege i get a large difference in transactions per seconds between the 2 tools
at times abs gives very poor results with a 3-6 trans per secs and siege return results with 22-26 trans per second
I am a little confused here, unable to decide if my new setup has improved performance or not!!.
Previously when i used to test i use to get 3-6 trans per sec on an avg which was low but when siege start giving results of 26 trans per sec i was convinced.
nginx.conf settings
client_header_timeout 30m;
client_body_timeout 30m;
send_timeout 30m;
connection_pool_size 256;
client_header_buffer_size 16k;
client_max_body_size 24M;
client_body_buffer_size 128k;
large_client_header_buffers 4 2k;
request_pool_size 4k;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 128k;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 1m;
fastcgi_buffers 4 500k;
fastcgi_busy_buffers_size 1m;
fastcgi_temp_file_write_size 1m;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
output_buffers 1 32k;
postpone_output 1460;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 2;
ignore_invalid_headers on;