Nginx hidden performance option
Posted by victori
Categories: solaris
Nginx hidden performance option's RSS feed
[4] comments
I am not exactly sure why this isn't documented but nginx as of 0.7.x supports event ports
This is a huge performance win for Solaris. Nginx can avoid the 0(n) file descriptor problem with event ports support.
To enable event ports add this to your nginx.conf
events {
use eventport;
}
Here is our performance-proven configuration that we use on fabulously40
The follow configuration will help you survive massive traffic with nginx. We have served 4.4 million requests in a 4 hour time frame with no issues. That is 305req/sec.
worker_processes 6;
worker_rlimit_nofile 10240;
events {
worker_connections 8024;
use eventport;
}
http {
keepalive_timeout 20;
server_names_hash_bucket_size 64;
sendfile on;
tcp_nopush on;
client_max_body_size 150m;
gzip on;
gzip_comp_level 5;
gzip_vary off;
gzip_proxied any;
gzip_types text/plain text/css text/xml application/xml text/javascript text/html application/x-javascript;
}
Hendry Lee
PostedWhat types of hardware spec are you on to serve 305req/s?
Which operating system? Do you tune various kernel configuration?
Hendry Lee
PostedI just read it again and missed it the first time. You're using Solaris.
Still hardware info such as memory and processor help though.
Thanks for posting your configuration.
victori
Posted4gigs of ram / quad core xeon x5355
Anomalizer
PostedIf nginx were directly serving the page (i.e. no prxy, no cgibin etc. etc.), you should see ~10,000 req/s for that hardware on Linux. And I don't think Solaris is the problem here.
The limitation if any is mostly that of your web application; not nginx