Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2001 09:29:24 +0200
From:      devet@devet.org (Arjan de Vet)
To:        juha@saarinen.org
Cc:        stable@freebsd.org
Subject:   Re: UFS_DIRHASH - your opinion
Message-ID:  <20011025092924.A483@adv.devet.org>
In-Reply-To: <Pine.LNX.4.33.0110251238420.1929-100000@vimfuego.saarinen.org>
References:  <Pine.BSF.4.32.0110241830320.88834-100000@mail.wolves.k12.mo.us>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.LNX.4.33.0110251238420.1929-100000@vimfuego.saarinen.org> you write:

>Thanks. Are there any good hints and tips for running Squid under FreeBSD? 
>On Linux, a file system like ReiserFS is supposedly the best, as it's good 
>with lots of little files.

Some file system related tips:

- make sure you have a recent 4.4-stable with the 'dirpref' code.

- I used

     newfs -b 16384 -f 2048 -c 89 -i 8192 -g 10240 -h 256 -U

  to newfs the /cache* partitions (one partition per physical disk). -b
  16384 makes sure that approx. 90% of your Squid objects fit in one
  disk block. The -c was the maximum allowed value. -g 10240 is the
  average file size and -h 256 the average number of files per directory
  for a Squid partition (used by the dirpref code).

  Mount the /cache* partitions with noatime.

- Put vfs.vmiodirenable=1 in /etc/sysctl.conf, this improves caching of
  directories *significantly* (you really want to have the full Squid
  directory structure in memory, make sure you have enough RAM).

- Use diskd for your cache_dir settings; this avoids the Squid process
  itself blocking for each disk I/O. I've considered using multiple
  partitions per physical disk to increase the number of diskd's that
  can perform I/O simultaneously but have not tried it yet.

Arjan

-- 
Arjan de Vet, Eindhoven, The Netherlands               <devet@devet.org>
URL: http://www.iae.nl/users/devet/             <Arjan.deVet@adv.iae.nl>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011025092924.A483>