Date: Mon, 19 May 2003 10:19:53 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Gabriel Ambuehl <gabriel_ambuehl@buz.ch> Cc: questions@freebsd.org Subject: Re: Performance constraints of HUGE directories on UFS2? Any O(F(N)) values? Message-ID: <20030519151953.GF76271@dan.emsphone.com> In-Reply-To: <931912216734.20030519163205@buz.ch> References: <931912216734.20030519163205@buz.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 19), Gabriel Ambuehl said: > Hi, > I was wondering how bad the performance penalties of really large > directories (say >20K entries) on UFS2 are? Reason why I'm asking is > that I'd like to know if it is required to split up so big > directories (along the lines of $firstchar/$secondchar/$filename) or > if UFS2 is performant enough not to care all too much. > > I guess I'm after a O(F(N)) value in a way (I haven't yet decided > which one would be good enough though, suppose I'd like to hear its > O(log(N)) in which case I don't need to care for splitting the dirs > ;-). I think "options UFS_DIRHASH" in your kernel config is what you want. It creates a hash table in memory for large directories. http://www.cnri.dit.ie/Downloads/fsopt.pdf has some benchmark results, and for certain cases dirhash really helps. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030519151953.GF76271>