Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2011 12:35:05 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-fs@freebsd.org
Subject:   Re: dirhash and dynamic memory allocation
Message-ID:  <j7938v$66s$1@dough.gmane.org>
In-Reply-To: <4E97FEDD.7060205@quip.cz>
References:  <4E97FEDD.7060205@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?j7938v$66s$1>