Nginx Benchmark Serving Static Image Timeouts

justin nginx-forum at
Wed Apr 18 04:39:38 UTC 2012

Hello, I am benchmarking nginx, serving a static image (png file which
is 6kb) with I am sending 250 requests a second for 60
seconds. When I run the benchmark approximately 15% of the requests are
taking longer than 2 seconds, which is completely unacceptable. Nginx
should be able to fly at this, even though its a lot of requests. At
first I thought that I must be maxing out the network interface, but I
looked and only pushing 10-12mbps. Any ideas what could be causing

Here is the performance directives that I have modified in nginx:

worker_processes 4;

events {
  worker_connections  2048;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
gzip on;
gzip_proxied any;
gzip_comp_level 3;
gzip_disable "MSIE [1-6].(?!.*SV1)";
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;
client_max_body_size 16M;

location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
  expires 30d;
  add_header Pragma public;
  add_header Cache-Control "public, must-revalidate, proxy-revalidate";

Posted at Nginx Forum:,225456,225456#msg-225456

More information about the nginx mailing list