From owner-freebsd-fs Thu May 2 9:39: 2 2002 Delivered-To: freebsd-fs@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id 22FE037B416 for ; Thu, 2 May 2002 09:38:56 -0700 (PDT) Received: from pool0542.cvx22-bradley.dialup.earthlink.net ([209.179.200.32] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #2) id 173JbZ-0002th-00; Thu, 02 May 2002 09:38:53 -0700 Message-ID: <3CD16B80.BAC37697@mindspring.com> Date: Thu, 02 May 2002 09:38:24 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Anna M =?iso-8859-1?Q?Ruthstr=F6m?= Cc: freebsd-fs@freebsd.org Subject: Re: Filesystem References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Anna M Ruthstr=F6m wrote: > Hello, > = > Im sing bsd 3.4 on my current system. > Is there any limitation of how many directorys you can have in one > directory, and if so can this parameter be changed? I heard something a= but > 32 676 directorys in a directory, is this true? There is no limitation except inodes and available disk space. However, it's an incredibly bad idea to have huge numbers of entries in a directory, since search time for all but a few FS implementations is linear, so depending on a faster search time would make your code dependent on a particular UNIX or FS implementation. It's always a bad idea to intentionally write non-portable code. If you are trying to abuse the FS name space as a hierarchical database with a wide key space, you would be better off: 1) Using a real database, where search will be O(log2(N)) instead of O(N) for non-existant entries and O(N/2) for exiting entries 2) Using a relational instead of a hierarchical database; by their nature, hierarchical databases are designed to be deep and not wide 3) Or use a hierarchical database with tier indexing, so that certain tiers can be very wide, but most data is hierarchical (an example of this would be an LDAP directory; see http://www.openldap.org ) -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message