From owner-freebsd-fs Tue Sep 5 20: 1: 4 2000 Delivered-To: freebsd-fs@freebsd.org Received: from cage.simianscience.com (cage.simianscience.com [64.7.134.1]) by hub.freebsd.org (Postfix) with ESMTP id 984B237B43E for ; Tue, 5 Sep 2000 20:01:01 -0700 (PDT) Received: from chimp (chimp [192.168.0.2]) by cage.simianscience.com (8.11.0/8.9.3) with ESMTP id e8630vV30763; Tue, 5 Sep 2000 23:00:57 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <4.2.2.20000905224117.032376f8@mail.sentex.net> X-Sender: mdtancsa@mail.sentex.net X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.2 Date: Tue, 05 Sep 2000 22:55:47 -0400 To: freebsd-fs@freebsd.org From: Mike Tancsa Subject: optimal directory creation Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I really dont know much about UFS, but from the little I understand, issues such as amount of files in a directory affect performance and from what someone told me, the order of directory creation. To make a new pop3 server a little more efficient, I implemented a 2 level hashed tree. But, what I am not sure of is if the initial creation of the directories are important. e.g. should I create (assuming for this case, usernames are only [a-z][a-z]*. Should I create the directories in the order 1) /var/mail/a /var/mail/a/a /var/mail/a/b . . . /var/mail/z/z or 2) /var/mail/a /var/mail/b . . /var/mail/z then /var/mail/a/b /var/mail/a/c . . /var/mail/z/z 3) create /var/mail/s /var/mail/s/o /var/mail/t /var/mail/t/a . . . /var/mail/j/z assuming that I had the most popular usernames starting with so, then ta with the least popular jz ? Thoughts/comments ? I was going to try some simple benchmarks to see if there were any obvious differences, but the theory behind it would be great to know. Thanks, ---Mike -------------------------------------------------------------------- Mike Tancsa, tel +1 519 651 3400 Network Administration, mike@sentex.net Sentex Communications www.sentex.net Cambridge, Ontario Canada www.sentex.net/mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message