Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 2000 04:03:59 -0400 (EDT)
From:      Adrian Filipi-Martin <adrian@ubergeeks.com>
To:        "Nicole Harrington." <nicole@unixgirl.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: How many files can I put in one diretory?
Message-ID:  <Pine.BSF.4.10.10006220400050.8079-100000@lorax.ubergeeks.com>
In-Reply-To: <XFMail.000621234237.nicole@unixgirl.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 Jun 2000, Nicole Harrington. wrote:

> 
>  Hello
>  I have a user who needs to store a large amount of small html files. Like
> around 2 million...
> 
>  Assuming FreeBSD 4.0-Stable with Soft Updates, what is a sane number that can
> be handled per directory?

	Softupdates doesn't really help with large directories.  The
limiting factor is that directories are unsorted so opening a file is a
linear search on the directory.

	Break your files into subdirectories and then maybe another level
or two of subdirectoies.  Try to keep the directories balanced.  Ideally,
the path is a perfect hash on the filenames.

	Still, you might want to think about a DB or somethign other thana
large directory for storing 2 million files.

	Adrian
--
[ adrian@ubergeeks.com -- Ubergeeks Consulting -- http://www.ubergeeks.com/ ]



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10006220400050.8079-100000>