There is no reason to change the L2 value (256). It controls how many
files Squid stores in each individual second-level directory (and how
many second-level directories there are).
For very small caches there may be a benefit in using a smaller L1 value
to decrease the inode overhead of creating all those directories. And
for large caches (above 7-10GB) using a larger L1 value may be better to
keep the file distribution well balanced.
If you want a formula for L1 then use the following
L1 = ceil(cache_size / average_object_size / L2 / L2 * 2)
A reasonable number for average_object_size is about 13 KB.
Simplified this becomes roughly 1 L1 directory per 400 MB of cache.
Warning: Changing these parameters generally requires you to clean your
cache.
Regards
Henrik Nordstrom
Squid Hacker
Hanantyo Adhi Pramono wrote:
>
> here if i using ufs
> cache_dir ufs /usr/local/squid/cache 100 16 256
> so if i using aufs , it should be ..
> cache_dir aufs /usr/local/squid/cache 100 16 256
>
> 16 <-- this is the 1st subdir ...
> 256 <-- this is the 2nd level
>
> where is the 16 value (in 1st level) and 256 ( in 2nd level) come from
> is there any formula to caculate it ... ???
>
> thank's
>
> hap
Received on Sat Sep 22 2001 - 17:29:52 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:02:27 MST