Date: Fri, 14 Oct 2011 14:33:18 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: dirhash and dynamic memory allocation Message-ID: <4E982C0E.2060900@quip.cz> In-Reply-To: <j7938v$66s$1@dough.gmane.org> References: <4E97FEDD.7060205@quip.cz> <j7938v$66s$1@dough.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote: > On 14/10/2011 11:20, Miroslav Lachman wrote: >> Hi all, >> >> 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. Is this change documented somewhere? Maybe it could be noticed on DirhashDynamicMemory wiki page. Otherwise it seems as abandoned GSoC project. > 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. I don't have 9 installed to test it. Only 8-STABLE. Hope I will test it soon. Thank you for your informations! Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E982C0E.2060900>