Welcome! Log In Create A New Profile

Advanced

Re: Cache Volume utilized at around 50 % with proxy_cache_min_uses

Maxim Dounin
August 25, 2020 12:52PM
Hello!

On Tue, Aug 25, 2020 at 07:41:43AM -0400, anish10dec wrote:

> With use of proxy_cache_min_uses volume of cache is getting settled up at
> around 50% utilization.
> No matter what is the volume allocated in max_size its not filling up
> further beyond 50%.
> If the proxy_cache_min_uses is removed the cache gets filled up with
> max_size allocated volume.
>
> No of files in cache directory is far less beyond the size allocated in key
> zone. Its getting capped up near 20 Lakhs whereas allocated key zone could
> have accommodate around 80 L files with below configuration

It is important to understand that number of files in the cache
directory is not directly related to the keys zone size when using
proxy_cache_min_uses. Instead, when using proxy_cache_min_uses,
keys zone needs to keep information about all resources requested,
to correctly trac usage numbers, and this usually much higher than
the number of files saved to disk. This is what
proxy_cache_min_uses does: it saves disk space and disk bandwidth
by tracking information only in the keys zone.

Given the above, I see two possible reasons why the cache volume
is only filled at 50%:

1. You've run out of keys_zone size.

2. You've run out of resources requested frequent enough to be
cached with proxy_cache_min_uses set to 2.

It should be easy enough to find out what happens in your case.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Cache Volume utilized at around 50 % with proxy_cache_min_uses

anish10dec August 25, 2020 07:41AM

Re: Cache Volume utilized at around 50 % with proxy_cache_min_uses

Maxim Dounin August 25, 2020 12:52PM

Re: Cache Volume utilized at around 50 % with proxy_cache_min_uses

anish10dec August 25, 2020 03:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
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