bad performance with nginx cache

Igor Sysoev igor at sysoev.ru
Fri Aug 27 14:56:57 MSD 2010


On Fri, Aug 27, 2010 at 02:10:50PM +0400, Franchoze Eric wrote:

>  Hello,
> 
> On these week I tried speed up nginx work with turning on cache for graphics files specified by extentions (jpg, png, bmp, etc.) in config file. On system without any load client (web browser) loaded pages for the same time - with cache or without cache. But after installing same configuration on real server I realized the following issue:
> 
> 1. Nginx can not speed up more then 150Mbit/s is cache is no hard drive. Can speed up to 200Mbit/s if cache is on tmpfs.
> 2. Load time from client begins to be 2-3 times lager then without cache if traffic is about 150Mbit/s. This happens for all files even if they were not specified in nginx.conf.
> 
> Does anybody have successful nginx cache run with throughput 500-600Mbit/s? Does it speed up or lower end client page load speed?
> 
> My configuration is SMP machine with nginx worker per cpu.
>     proxy_cache_path  /var/www/cache2 levels=1:2 keys_zone=my-cache:512m max_size=3000m inactive=10m;
>     proxy_temp_path /var/www/cache2/tmp;
>     proxy_cache_key "$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";

Also, you do not need this ugly proxy_cache_key, use default one instead.


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx-devel mailing list