From owner-freebsd-fs@FreeBSD.ORG Fri Oct 14 10:35:32 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 565DD1065670 for ; Fri, 14 Oct 2011 10:35:32 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id D63568FC20 for ; Fri, 14 Oct 2011 10:35:31 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1REf6v-0003Aj-TB for freebsd-fs@freebsd.org; Fri, 14 Oct 2011 12:35:29 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Oct 2011 12:35:29 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Oct 2011 12:35:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Ivan Voras Date: Fri, 14 Oct 2011 12:35:05 +0200 Lines: 53 Message-ID: References: <4E97FEDD.7060205@quip.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4D4328D43A65108185353101" X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111004 Thunderbird/7.0.1 In-Reply-To: <4E97FEDD.7060205@quip.cz> X-Enigmail-Version: 1.1.2 Subject: Re: dirhash and dynamic memory allocation X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 10:35:32 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4D4328D43A65108185353101 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 14/10/2011 11:20, Miroslav Lachman wrote: > Hi all, >=20 > I tried some tuning of dirhash on our servers and after googlig a bit, = I > found an old GSoC project wiki page about Dynamic Memory Allocation for= > Dirhash: http://wiki.freebsd.org/DirhashDynamicMemory > Is there any reason not to use it / not commit it to HEAD? AFAIK it's sort-of already present. In 8-stable and recent kernels you can give huge amounts of memory to dirhash via vfs.ufs.dirhash_maxmem (but except in really large edge cases I don't think you *need* more than 32 MB), and the kernel will scale-down or free the memory if not needed. In effect, vfs.ufs.dirhash_maxmem is the upper limit - the kernel will use less and will free the allocated memory in low memory situations (which I've tried and it works). > And second question - is there any negative impact with higher > vfs.ufs.dirhash_maxmem? It stil defaults to 2MB (on FreeBSD 8.2) after Not that I know of. > 10 years, but I think we all are using bigger FS in these days with lot= > of files and directories and 2MB is not enough. AFAIK I've changed it to autotune so it's configured to approximately 4 MB on a 4 GB machine (and scales up) in 9. --------------enig4D4328D43A65108185353101 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6YEF8ACgkQldnAQVacBcgr/QCeLLxe/5TD3zr4EKC9DGG8dmhC q5oAoPrVCYgrh5bFIl7CwSzEIgc45Ty3 =NAht -----END PGP SIGNATURE----- --------------enig4D4328D43A65108185353101--