Re: different disk sizes?

From: Dancer <dancer@dont-contact.us>
Date: Wed, 31 Dec 1997 14:59:52 +1000

The answer is in the FAQ. Squid assumes that the size for each cache_dir is
the size of cache_swap divided by the number of cache_dir statements.

(Eg:

cache_swap 8000
cache_dir /squid/cache1
cache_dir /squid/cache2
cache_dir /squid/cache3
cache_dir /squid/cache4

...yields 4 cache trees of 2GB each)

Therefore, you set up your cache-directories on various drives so that the
size of each works out to the lowest common denominator:

Posit: Two drives for cache space. One with 2GB of space, and one with 4GB.
We'll call them /small and /large respectively.

cache_swap 6000 # 6GB total space.
cache_dir /small/cache1
cache_dir /large/cache2
cache_dir /large/cache4

This puts two 2GB cache_dirs on the larger drive, and one on the smaller,
making sure you have the whole 6GB.
(Actually, because the swap_log takes up a bit of space, I usually reduce
cache_swap by a number of MB to allow for it. It'll get stored in the first
cache_dir)

D

Bruce Campbell wrote:

> On Wed, 31 Dec 1997, Skeeve Stevens wrote:
>
> > what happens when you specify 2 directories for the cache and one is
> > 4 gig and one is 8gig... will squid use the maximum on both? or hit a
> > 4gig watermark on the 8gig?
>
> You'd tell squid that the (total) size of cache is say 12gig and let squid
> itself work out how big each drive is. Have to admit never looked closely
> at this aspect (normally using identical drives or to within a few hundred
> meg), and suspect squid will go 'oh, I'm out of disk space, lets dump a
> lot of stuff' rather than 'oh, that drive is full, I'll concentrate on the
> other unfull drive'. Anyone got documented behaviour on this?
>
> Why not instead partition the 8gig and have a total of 3 4gig partitions
> and avoid the whole issue? ;)
>
> --==--
> Bruce.
>
> Systems Administrator
> Hub Communications.

--
Note to evil sorcerers and mad scientists: don't ever, ever summon powerful
demons or rip holes in the fabric of space and time. It's never a good idea.
ICQ UIN: 3225440
Received on Tue Dec 30 1997 - 21:03:09 MST

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