Re: number of dirs

From: Steve Snyder <swsnyder@dont-contact.us>
Date: Thu, 27 Jan 2000 10:25:38 -0500 (EST)

On Thu, 27 Jan 2000 05:27:15 -0800 (PST), visolve cache wrote:

>Hi,
>
>--- Florin Andrei <florin@mail.maronet.ro> wrote:
>>
>> In Squid, the default is to create in the cache 16
>> first-level directories
>> and 256 second-level ones. That should be enough for
>> a small cache.
>> But what is the reasonable estimate for a 20 GB
>> cache? How many
>> first-level? How many second-level?
>
> I had the same problem and got this answer from the
>mailing-list.
>
>second-level = 256, unless you know that your OS
>performs better using another value. The intention is
>to keep search times in the L2 directories reasonably
>fast (within one or two memory pages).
>
> first-level = cache_dir size * 2 /
>store_avg_object_size / L2 / L2

It was suggested to me, also on this list, that 254 is a better number
on the Linux ext2 filesystem. (Remember, the original poster said he
is running on RH 6.0.)

The reasoning behind this is that 254 entries is the max that can be
fitted into a 4KB memory page. Thus 254 makes more efficient use of
precious system RAM and reduces the potential for swapping.

*** Steve Snyder ***
Received on Thu Jan 27 2000 - 11:07:44 MST

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