On 23/08/2013 5:27 p.m., HillTopsGM wrote:
Thanks for the Reply Amos.
As per my original post, can anyone comment on the original 2 questions?
*Question 1:* If I wanted to dedicate 3 GB of the Ram to the index, would
that mean that I should set my cache_dir to 3072?
cache_dir ufs /usr/local/squid/var/cache 3072 16 256
No. This allocates 3GB for disk storage. The index space used by that
would be 45MB.
The rule-of-thumb is 15MB *per GB of cache size*.
For 3GB of RAM used by disk index you want to limit your cache_dir to no
more than 200GB of capacity. This varies by average object size stored
there. For exampel if you store only MB-sized objects in there it could
be using 15MB of RAM index *per TB*.
*Question 2:* Seeing how this is significantly larger that the default 100
MB should I consider increasing the size of the "16 256" in the above sample
code?
UFS, AUFS, and diskd cache_dir types use filesystem folders/directories
and files to store the cache objects. Those two numbers are the count of
sub-directories and sub-sub-directories to spread the object files over.
This is necessary on some operating systems and filesystems to prevent
reaching limits about too many files in one directory. Squid will cache
up to 2^24 files spread over those directories.
Amos