giving right size for cache_dir config

From: Thierry CAILLET <[email protected]>
Date: Wed, 9 Jun 1999 17:18:56 +0200

Hi everybody,

On my FreeBSD 3.1 Box, my disk are declared rw,async,noatime in fstab and
a tunefs -m 0 has been made to recover 8% of the disk.

But how can i calculate the exact size to give for cache_dir parameter ?
( a disk full error have already occured, and we losed the objects )

- % df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/da0s1a 1984479 688027 1137694 38% /
/dev/da0s1e 6156778 5939825 216953 96% /cache
/dev/da1s1e 3969982 3910129 59853 98% /cache1
/dev/da1s1f 4668155 2332385 2335770 50% /cache2
procfs 4 4 0 100% /proc

- what i have in squid.conf :
cache_dir /cache 5177 16 256
cache_dir /cache1 3346 16 256
cache_dir /cache2 3927 16 256 (not full)

- What i have in cachemgr.cgi/Store Directory Stats

Store Directory Statistics:
Store Entries : 828568
Maximum Swap Size : 12748800 KB
Current Store Swap Size: 10581193 KB
Current Capacity : 83% used, 17% free

Store Directory #0: /cache
First level subdirectories: 16
Second level subdirectories: 256
Maximum Size: 5301248 KB
Current Size: 5036186 KB
Percent Used: 95.00%
Filemap bits in use: 380115 of 815576 (47%)
Flags:

Store Directory #1: /cache1
First level subdirectories: 16
Second level subdirectories: 256
Maximum Size: 3426304 KB
Current Size: 3255005 KB
Percent Used: 95.00%
Filemap bits in use: 241237 of 527123 (46%)
Flags:

Store Directory #2: /cache2
First level subdirectories: 16
Second level subdirectories: 256
Maximum Size: 4021248 KB
Current Size: 2290002 KB
Percent Used: 56.95%
Filemap bits in use: 198462 of 618653 (32%)
Flags: SELECTED

I calculated this by doing more or less :
df of the cache disk - Filemap bits Max given by cachemgr / 1024

What is the right way to calculate the real size ?
Received on Wed Jun 09 1999 - 09:13:44 MDT

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