From owner-freebsd-performance@FreeBSD.ORG Sun Aug 7 18:47:18 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 E449716A41F for ; Sun, 7 Aug 2005 18:47:18 +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 3B17043D46 for ; Sun, 7 Aug 2005 18:47:18 +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 24D3EEB4F73 for ; Mon, 8 Aug 2005 02:47:15 +0800 (CST) Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id BFCF81351B6 for ; Mon, 8 Aug 2005 02:47:13 +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 61558-14 for ; Mon, 8 Aug 2005 02:47:07 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 23F28131F9D; Mon, 8 Aug 2005 02:47:07 +0800 (CST) Date: Mon, 8 Aug 2005 02:47:07 +0800 From: Xin LI To: freebsd-performance@FreeBSD.org Message-ID: <20050807184707.GA61714@frontfree.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline 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: Subject: [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 18:47:19 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Bcc'ed to -developers@, so this can be discussed in a public list] Hi, It seems that vfs.ufs.dirhash_maxmem is set to 2MB. I think this value is slightly too small for modern machines: - There are many applications that relies on small files. CVS, maildir, etc. For these applications a typical need of dirhash would be much larger than 2MB. - The RAM equiped with modern computers are growing fast. - Increasing dirhash_maxmem does not bring too much overhead on small systems, as the system would automatically recycle unused entities. If the memory was not freed in time, then it is usually because the system is busy accessing a zillion of small files. Moreover, it is possible for the user to change the default value back to a smaller value if the file indexing is not their performance bottleneck. My proposal is to increase the default dirhash_maxmem value to at least 32MB or 64MB. Any objections? Cons for this, discussed in -developer: - dirhash does not implements automatical mechanism to reduce memory usage in response to system memory pressure, and benefits mainly to large directories, e.g. Maildirs. Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC9lcr/cVsHxFZiIoRAqjnAJ9Mh58qF+USy9KM/2EslptVZvuFawCfaqQO tnyAc8m/HEwtCG6hGAfaGlE= =/cHX -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--