# Nginx Benchmark Serving Static Image Timeouts

**URL:** <https://www.ruby-forum.com/t/nginx-benchmark-serving-static-image-timeouts/218989>\
**Category:** NGINX\
**Created:** [April 18, 2012, 6:40am UTC](https://www.ruby-forum.com/t/nginx-benchmark-serving-static-image-timeouts/218989 "2012-04-18T06:40:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurdipe\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b77776/32.png) [@Gurdipe\_D](https://www.ruby-forum.com/u/Gurdipe_D)\
**Post date:** [April 18, 2012, 6:40am UTC](https://www.ruby-forum.com/t/nginx-benchmark-serving-static-image-timeouts/218989/1 "2012-04-18T06:40:29Z")

</div>

Hello, I am benchmarking nginx, serving a static image (png file which  
is 6kb) with [http://blitz.io](http://blitz.io). 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  
this?

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:

> **[Nginx Benchmark Serving Static Image Timeouts](https://forum.nginx.org/read.php?2,225456,225456#msg-225456)**
>
> Hello, I am benchmarking nginx, serving a static image (png file which is 6kb) with http://blitz.io. 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...
