*BSD News Article 93096


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!news.bri.connect.com.au!fjholden.OntheNet.com.au!not-for-mail
From: Tony Griffiths <tonyg@OntheNet.com.au>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Formating Drives For Squid
Date: Tue, 08 Apr 1997 10:32:53 +1000
Organization: On the Net (ISP on the Gold Coast, Australia)
Lines: 60
Message-ID: <33499235.6FF0@OntheNet.com.au>
References: <3346eefa.0@news.topend.com.au> <5i6459$en2$1@klemm.gtn.com>
Reply-To: tonyg@OntheNet.com.au
NNTP-Posting-Host: swanee.nt.com.au
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (WinNT; I)
To: nagy@darwin.topend.com.au
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38753

Andreas Klemm wrote:
> 
> In article <3346eefa.0@news.topend.com.au>,
>         nagy@darwin.topend.com.au (Robert Nagy) writes:
> > Hi Folks,
> >
> > I'll be formatting a couple of drives to use as disk cache with squid.
> > What is the best block size (& other settings) to set these drives up as.
> > Both drives are 3.1GB in size.
> 
> The new squid's cachemgr.cgi interface shows you how many
> percent of objects use a certain block size ...

I've done a bit of research in this area and have just installed a
new cacheing proxy.  Basically, the average HTTP object seems to be
about 11-12 KB while the average FTP object is 2 orders of magnitude
greater (ie. 0.5 - 1 MB) but there are FAR fewer of them.  The ratio
of HTTP to FTP objects in our cache is 230:1 !

> So I'd first suggest you use the standard ufs filesystem block-
> and fragsize, 8k/1k, but increasing the number of inodes,
> since I assume, you get similar little files as in a news
> filesystem.

The problem with doing this is that once you have a reasonable cache
on which to compute optimal filesystems numbers, you then have to
blow it all away and start again!

So, here are the values I used on a 4.3 GB disk totally dedicated
to the Squid proxy...

	-b 8192 -f 2048 -i 12288

The 'b' of 8 KB allows 1 inode to map up to 96 KB of disk which is more
than adequate for HTTP objects and not too small for FTP objects while
the # of inodes on the 4.3 GB disk with -i = 12 KB comes to about
350,000
which again is adequate for the 230,000 - 240,000 objects in the cache!

If anything, you could make the frag smaller and possibly up the -i to
16 KB but be careful about running out of inodes...

If the 2 x 3.1 GB disks are all that you have on the machine, then they
need to contain the system files, swap space, the Squid log files, and
the cache itself.  I have 4 SCSI disks arranged as-

 1 x 1 GB =>	system (/,/var,/usr)
 2 x 1 GB =>	stripe set for Squid logs (-b 16384, -f 8192, -i 131072)
 1 x 4 GB =>	Squid proxy cache

There are also 3 swap partitions of 128 MB (384 total) on the 3 smaller
drives as Squid can go 'strange' at times and swallow huge amounts of
VM!!!
We're still on Squid 1.1.3 as I havn't has the time to upgrade to 1.1.9
so
some of the VM problems have probably been fixed allowing less swap
space.
The machine itself has 96 MB of RAM now and will have 128 MB shortly.

Tony