Welcome! Log In Create A New Profile


new config option for ngx_expire_old_cached_file

Franchoze Eric
October 14, 2010 06:16AM

I did a lot of various experiments with nginx cache. And found that cache has performance problems when number of cache objects much bigger than available place in the cache.
As I understand increasing value in ngx_expire_old_cached_file() makes cache freeing more aggressive. When loads ups more them 200Mb/sec I saw a lot of cache stalls before increasing
this number, from the other side with low load 50 M/s (about 50 requests per second) everything worked fine . Can you please take a look if it makes sense to move this value to config.

--- nginx-0.8.52_orig/src/core/ngx_open_file_cache.c 2010-04-21 08:59:36.000000000 -0700
+++ nginx-0.8.52/src/core/ngx_open_file_cache.c 2010-10-12 08:47:45.000000000 -0700
@@ -735,7 +735,7 @@ ngx_expire_old_cached_files(ngx_open_fil
* and one or two inactive files

- while (n < 3) {
+ while (n < 30) {

if (ngx_queue_empty(&cache->expire_queue)) {


nginx-devel mailing list
Subject Author Views Posted

new config option for ngx_expire_old_cached_file

Franchoze Eric 2513 October 14, 2010 06:16AM

Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready