Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using nginx as a reverse proxy, but trying to figure out how large I should set the 'keys_zone' attribute on the 'proxy_cache_path' directive. The only advice on determining that size that I have found is

However this does not sound right to me as 'max_size / (average file size)' seems like way overkill.

Isn't keys_zone just the metadata for the cached file on disk? therefore, the size of a given entry should be really small. Is there any way to do a 'get' on an entry in the zone so I can see how much space a given entry is taking up?

share|improve this question


Zone size should be set proportional to number of pages to cache. The size of the metadata for one page (file) depends on the OS; currently it is 64 bytes for FreeBSD/i386, and 128 bytes for FreeBSD/amd64.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.