B
B
borodka_lenina2017-04-17 10:24:00
Nginx
borodka_lenina, 2017-04-17 10:24:00

Why did nginx save cache over quota?

For some reason, yesterday, despite max_size=26g, nginx consumed 30GB, and to be precise,
30618048. How could this happen?
proxy_cache_path /mnt/nginx/cache levels=1:2 keys_zone=cache:512m max_size=26g inactive=30d;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2017-04-19
@borodka_lenina

Disk space is occupied by blocks and a 1 byte file still occupies one block (usually 4kb, depending on the file system and its settings), so if you have a million files of 1 byte each, this does not mean that you will have 1Mb occupied. Plus directories also take up space.
Programs usually count file sizes in bytes. Therefore, if you have a lot of small files in the cache, then nginx may well consider that it fits into the quota.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question