On Wed, 31 Mar 2004, Gaetano Mendola wrote:

> cache_dir aufs /var/spool/squid  C  L1 L2
> 
> L1 = ((C*1000)/256/256/13)*2
> L2 = 256
> 
> so with
> 
> C = 10000 =>  L1 = 22
> or
> C = 50000 =>  L1 = 110
> 
> is this formula reasonable ?

Yes. It was me who wrote this long time ago..

> Before to use this formula I was using:
> C = 50000 and L1 = 16
> and believe me the performances were realy
> bad.

Not due to this however.. performance difference these parameters are 
pretty minimal.

> Another question, if I want rise C and then L1
> do I have to reinitialize ( delete and recreate )
> the swap ?

Yes, if your cache has been filled as this changes how files will be 
distributed in your cache_dir.

In theory you could write a small program to rearrange the existing files 
to have them moved to their proper location for the new L1/L2 parameters.

 L1 directory = ( file number / (L2 * l2) ) % L1

 L2 directory = ( file number / L2 ) % L2

Regards
Henrik

Reply via email to