proxy_cache calculating size error under SSD drive but not SATA drive
feanorknd
nginx-forum at nginx.us
Thu Jul 18 11:46:01 UTC 2013
Hello:
I think I am on the right way, but not sure...
The scenario:
- Have 2 drives:
-> SSD drive - XFS - default options (with
noatime, discard) - almost empty
-> SATA drive - XFS - default options - almost
empty
- Kernel variables, shared memory, ulimits, max-file, etc... all correctly
configured
- Nginx and virtualhost correctly configured.
- proxy_cache_path <PATH> levels=1:2 keys_zone=catalogo_fotos:2500m
max_size=2500m inactive=120d;
Ok.. here I am... it depends of the path... the problem is:
- If the path is at SATA drive -> cache is growing until maximum 2500m are
reached... no problem here. Normal..
- If the path is at SSD drive -> cache is not growing until limit... it
stale... problem... why?
If debug see:
2013/07/18 13:15:52 [debug] 17641#0: http file cache size: 640039
2013/07/18 13:15:52 [debug] 17641#0: http file cache forced expire
2013/07/18 13:15:52 [debug] 17641#0: http file cache forced expire: #0 1
933590ab
2013/07/18 13:15:52 [debug] 17641#0: http file cache expire:
"/DATA/cache/catalogo_fotos/7/3a/c1de7a39f5393c24933590ab20ba43a7"
while:
root at megaserver1 /DATA/cache # du -hs catalogomodacom_fotos/
1.8G catalogo_fotos/
root at megaserver1 /DATA/cache # find ./catalogo_fotos/ -type f | wc -l
17134
What happens?
Every 10 seconds, http file cache size detects max size and starts to force
expire and delete cached files...
What is that "http file cache size: 640039" ???? That number, which way is
calculated??? What it is?
I have enough shared memory, already properly configured (1Gb for each app
and 14Gb total).... and the question is if I change path and set it under
SATA drive there is no problem.
I am thinking at all at this "http file cache size: 640039"..... I think it
is the key about what is happening... that number is not near the max size
of 2500m defined for the cache deposit, and is not near the number of files
actually at cache, around 17134...
Could you help me please?
Thanks so much in advance.
Gino.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240993,240993#msg-240993
More information about the nginx
mailing list