Quantcast

behavior of cache manager in version 1.10.3

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

behavior of cache manager in version 1.10.3

AjaySawant
Hi,

The documentation for proxy_cache_path states:
           The data is removed in iterations configured by manager_files,
manager_threshold, and manager_sleep parameters (1.11.5).

I was wondering what the behavior of the cache manager was prior to release
1.11.5  (specifically, in version 1.10.3).
How often does the cache manager wake up to clean?

Thanks

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274215,274215#msg-274215

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: behavior of cache manager in version 1.10.3

Maxim Dounin
Hello!

On Mon, May 15, 2017 at 08:02:18AM -0400, Michael Corn wrote:

> The documentation for proxy_cache_path states:
>            The data is removed in iterations configured by manager_files,
> manager_threshold, and manager_sleep parameters (1.11.5).
>
> I was wondering what the behavior of the cache manager was prior to release
> 1.11.5  (specifically, in version 1.10.3).

Prior to changes in 1.11.5, cache manager removed all files it has
to remove according to "inactive" and "max_size" configured.  In
some cases this caused responsiveness problems due to huge disk
activity though (for example, if max_size was changed to a smaller
value), and hence the change.  Now cache manager sometimes sleeps
even if there are cache items to remove, to avoid overloading of
the IO subsystem.

> How often does the cache manager wake up to clean?

If cache manger has nothing to do, it sleeps till next expected
expiration of a cache item as per "inactive", or for 10 seconds,
whichever is sooner.  That is, if there are no inactive cache
items, "max_size" will be checked once in 10 seconds.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: behavior of cache manager in version 1.10.3

AjaySawant
Thanks.

One more question relating to cache cleaning. If I use version 1.11.5 or
greater, and
I set manager_sleep to a small number, say 50ms,  And I set
use_temp_path=off.
Now, I start receiving a large file from the upstream, let's say it will
take 10 seconds to receive it.
Will the cache_manager see the cache exceeding its max_size before the
entire new file has been received and start
cleaning up older entries from the cache in parallel to the new file being
received?
Or will it not take the size of this new file into account until it has been
completely received?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274215,274255#msg-274255

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: behavior of cache manager in version 1.10.3

Maxim Dounin
Hello!

On Tue, May 16, 2017 at 12:45:50AM -0400, Michael Corn wrote:

> One more question relating to cache cleaning. If I use version 1.11.5 or
> greater, and
> I set manager_sleep to a small number, say 50ms,  And I set
> use_temp_path=off.
> Now, I start receiving a large file from the upstream, let's say it will
> take 10 seconds to receive it.
> Will the cache_manager see the cache exceeding its max_size before the
> entire new file has been received and start
> cleaning up older entries from the cache in parallel to the new file being
> received?
> Or will it not take the size of this new file into account until it has been
> completely received?

Temporary files are not taken into account by the cache manager
process, regardless of the use_temp_path setting.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Loading...