Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache_path question

April 29, 2010 08:00AM
On Thu, Apr 29, 2010 at 11:24:51AM +0200, Marlon de Boer wrote:

> Hi list,
>
> I'm trying to limit the amount of data nginx caches but can't get it to
> work properly.
>
> I'm using the following line to limit the cache:
>
> proxy_cache_path /var/tmp/nginx/cache levels=1:2 keys_zone=cache:32m
> inactive=1440 max_size=32m;
>
> Is my assumption correct that this cache cannot grow any bigger than
> 32Mb? What I see in my case is /var/tmp/nginx/cache grows well above
> 32Mb (in my test I've seen 46Mb).
>
> Does anybody has a suggestion to get the cache limit to work?

It may be bigger at least for two reasons:
1) nginx counts only file size rounded to file system block size.
For example, on UFS it's fragment size.
As I understand, "du" counts in 1K blocks.
2) levels=1:2 means that nginx will create at least 8M directory hierarchy.


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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_cache_path question

Marlon de Boer April 29, 2010 05:32AM

Re: proxy_cache_path question

Igor Sysoev April 29, 2010 08:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 215
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready