Re: Quick Question

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Thu, 20 Feb 1997 11:10:01 +0200 (EET)

> I am debating with my self how to set up the new directory structure on a new cache I am
> building....
>
> I is a 4 gig disk.. and was wondering if anyone could recomend a good directory
> structure for this disk for the use with squid ..
>
> i.e. the swap level 1
> swap level 2
>
> objects per bucket
> and average object size ..

    I'd suggest to use 1 physical disk (or stripe or raid) per cache dir.
 Calculate expected max number of objects in your cache, using average
 object size of about 15-20 KB, ie. TOTALSIZE/average="total objects".
 Then divide this by 256 which is optimal number of files per level 2
 dirs and you'll get total number of needed directories in both level
 1 & 2. Numbers for each of these should be power of 2 (4, 8, 16, etc)
 Then, I'd suggest to select the lowest needed number for level 1, keeping
 level 2 smaller than 256 (make it 128). Then divide no of level 1 dirs
 by number of disks you have and you'll finally get needed numbers to
 put into config. If you have different sized disks, use smallest sized
 disk to calculate max size.
 All this is also noted in Release notes.

    All this is good for is to help OS make directory accesses faster,
 reducing no of directories helps to reduce needed cache size OS allocates
 for reducing physical disk io to find file in a directory.

-------------------------------------------------------------------
 Andres Kroonmaa Telefon: 6308 909
 Network administrator
 E-mail: andre@ml.ee Phone: (+372) 6308 909
 Organization: MicroLink Online
 EE0001, Estonia, Tallinn, Sakala 19 Fax: (+372) 6308 901
-------------------------------------------------------------------
Received on Thu Feb 20 1997 - 01:20:41 MST

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