Re: How to balance L1 and L2 caches?

From: Steve Snyder <swsnyder@dont-contact.us>
Date: Tue, 07 Dec 1999 20:40:23 -0500

Henrik Nordstrom wrote:
>
> Steve Snyder wrote:
>
> > Rather than further reducing L1, should I pare down L2 from its
> > default 256 instead? How does one determine a balance between L1 and
> > L2 values?
>
> L2 depends on your flavor of UNIX. The default of 256 is assumed to be
> good on most flavors. The intention is to keep search times in the L2
> directories reasonably fast (within one or two memory pages).
>
> L1 depends on the size of your cache, L2 and store_avg_object_size. For
> Squid up to 2.2 L1 should be at least "cache_dir_size * 2 /
> store_avg_object_size / L2 / L2". Less is bad, more will not hurt you
> much.

The calculation tells me:

  512 * 1024 * 2 / 256 / 256 = 1.23

which, rounded up, is L1=2. So I only need L1=2 and L2=256
to fully use my 512MB of cache space.

Would L1=4 and L2=128 be a better balance on my Linux (v2.2.13)
system? I would think that the reduced number of L2 directories
would make for reduced search times in comparison to L2=256.

Thank you.
Received on Tue Dec 07 1999 - 18:48:53 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:49:46 MST