Nginx Fastcgi_cache performance - Disk cached VS tmpfs cached VS serving static file

Maxim Dounin mdounin at mdounin.ru
Thu Oct 3 17:12:07 UTC 2013


Hello!

On Thu, Oct 03, 2013 at 12:34:20PM -0400, ddutra wrote:

[...]

> Scenario three - The same page, saved as .html and server by nginx
> 
> Transactions:                    1799 hits
> Availability:                 100.00 %
> Elapsed time:                 120.00 secs
> Data transferred:              25.33 MB
> Response time:                  2.65 secs
> Transaction rate:              14.99 trans/sec
> Throughput:                     0.21 MB/sec
> Concurrency:                   39.66
> Successful transactions:        1799
> Failed transactions:               0
> Longest transaction:            5.21
> Shortest transaction:           1.30
> 
> 
> Here is the main question. This is a huge difference. I mean, AFAIK serving
> from cache is supposed to be as fast as serving a static .html file, right?
> I mean - nginx sees that there is a cache rule for location and sees that
> there is a cached version, serves it. Why so much difference?

The 15 requests per second for a static file looks utterly slow, 
and first of all you may want to find out what's a limiting factor 
in this case.  This will likely help to answer the question "why 
the difference".

>From what was previously reported here - communication with EC2 
via external ip address may be very slow, and using 127.0.0.1 
instead used to help.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx mailing list