proxy_cache purge details

David Watzke david at watzke.cz
Thu Jan 16 12:33:17 UTC 2014


Hello,

we've got a problem with the proxy_cache feature in nginx. To be more 
precise, the problem occurs when the cache loader kicks in and starts 
deleting the expired files that are stored on a LVM-striped (non-raid) 
ext4 partition across six huge SSD disks. The purge (sometimes?) takes 
ages and it completely kills the reads from the partition.

That's hardly an nginx issue, but it is why we would like to know if 
there's a posibility to force the cache purge so that small amounts of 
files get deleted more often rather than a lot of files at once getting 
deleted less often.

Also, it would help us to know just exactly how (and where) does the 
nginx store the last-access-time information for each file (for the 
'inactive' feature in proxy_cache_path directive), if the atime feature 
is off for performance reasons. I'm guessing that it needs to store this 
so that it knows when to delete the files. It's quite difficult for us 
to find it in the sources, so if you could point us in the right 
direction, it would be awesome!

Thanks,
David



More information about the nginx mailing list