From owner-freebsd-performance@FreeBSD.ORG Sun Aug 7 19:05:51 2005 Return-Path: X-Original-To: freebsd-performance@FreeBSD.org Delivered-To: freebsd-performance@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD1E916A41F for ; Sun, 7 Aug 2005 19:05:51 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22F2443D48 for ; Sun, 7 Aug 2005 19:05:51 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: from beastie.frontfree.net (unknown [219.239.99.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 1BD9BEB10D0 for ; Mon, 8 Aug 2005 03:05:47 +0800 (CST) Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id 0A8BB135B01; Mon, 8 Aug 2005 03:05:43 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 61932-05; Mon, 8 Aug 2005 03:05:34 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id C14FD134E7F; Mon, 8 Aug 2005 03:05:33 +0800 (CST) Date: Mon, 8 Aug 2005 03:05:33 +0800 From: Xin LI To: Chuck Swiger Message-ID: <20050807190533.GA61954@frontfree.net> References: <20050807184707.GA61714@frontfree.net> <42F659AE.80905@mac.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline In-Reply-To: <42F659AE.80905@mac.com> User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #4: Thu Jul 28 10:59:26 CST 2005 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: amavisd-new at frontfree.net Cc: freebsd-performance@FreeBSD.org Subject: Re: [RFC] Bumping ufs.dirhash_maxmem to a larger value? X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2005 19:05:51 -0000 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 07, 2005 at 02:57:50PM -0400, Chuck Swiger wrote: [snip] > On the other hand, I've got several firewall boxes with only 128MB, and= =20 > it's not reasonable to simply dedicate up to 64MB (half!) to dirhash=20 > without paying more attention to the amount of physical memory that is=20 > actually available. Forgot to mention that dirhash_maxmem is the upper limit, not the exact amount that dirhash must use. If your firewall does not host zillion of large directories then a bigger default dirhash_maxmem would essentially a big no-op :-) > How big should dirhash_maxmem be? 5-10% of available RAM, perhaps? Actually this depends on how many large directories that you actively access, not only the available RAM. If you access only a little of small directories, e.g. hosting a database, then dirhash won't help much. But with a lot of large directories having 1000+ files in most of them, then raising the dirhash_maxmem will be a great help for performance. I think it would be great if we can implement a automatical "suggested value" of dirhash during bootstrap stage, though, which can be overridden through sysctl.conf or subsequent sysctl. Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC9lt9/cVsHxFZiIoRAm/kAJ9UZLf+FAk55+YA5BcEs3Su5IZTAACfRwzS ydUrVCocULNSkEkdUBlk2Ps= =eame -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE--