On 2014-02-14 10:53, Carlos Defoe wrote:
It's squid 3.3.8.
Yeah, I had forgotten about the replacement policies... in fact, I
read the "definitive guide", but it was almost 10 years ago.
I tried with an empty disk cache, default replacement policies, clean
start, and now it gets cached, but in memory. I'll wait till both
cache_mem and cache_dir get full, to test again.
Another possiblity that comes in mind is that the aufs threads could
have been very busy, thus discarding the objects instead of writing it
to disk.
One more question: how squid decides that an object should be stored
on disk instead of RAM?
When they first arrive this is the sole consideration is whether it is
bigger or smaller than this limit:
http://www.squid-cache.org/Doc/config/maximum_object_size_in_memory/
Objects with undefined length are assumed to be infinitely big and thus
require disk backing until further information is known about it (ie
delivered info causes it to exceed the memory limit, or the
end-of-object proves its best place).
Those jpeg images that are now cached on RAM,
will they ever be stored on disk?
Maybe, if the RAM is full and a new object needs space the least-popular
objects will be either dropped (if expired already) or pushed out to
disk cache.
Where "least-popular" is defined by the
http://www.squid-cache.org/Doc/config/memory_replacement_policy/
algorithm.
Amos