From owner-freebsd-stable Thu Oct 25 0:29:37 2001 Delivered-To: freebsd-stable@freebsd.org Received: from b80216.upc-b.chello.nl (b80216.upc-b.chello.nl [212.83.80.216]) by hub.freebsd.org (Postfix) with ESMTP id 2D84937B403 for ; Thu, 25 Oct 2001 00:29:31 -0700 (PDT) Received: from adv.devet.org (adv.devet.org [192.168.1.2]) by b80216.upc-b.chello.nl (Postfix) with ESMTP id 4D9C968D2; Thu, 25 Oct 2001 09:29:30 +0200 (CEST) Received: by adv.devet.org (Postfix, from userid 100) id D85043F66; Thu, 25 Oct 2001 09:29:24 +0200 (CEST) Date: Thu, 25 Oct 2001 09:29:24 +0200 To: juha@saarinen.org Cc: stable@freebsd.org Subject: Re: UFS_DIRHASH - your opinion Message-ID: <20011025092924.A483@adv.devet.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i X-Newsgroups: list.freebsd.stable Organization: Eindhoven, the Netherlands From: devet@devet.org (Arjan de Vet) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article 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 URL: http://www.iae.nl/users/devet/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message