Mike Prince wrote:

the files around).  The new directory is arranged as
./spool/hostname/m/me/mike.xml where the first fanout directory under
hostname is the first character of the username, and the second fanout
directory is the first and the last characters of the username.  Pretty
simple.

A better directory naming scheme is


# I compute some hash function on filename
hash=md5sum("mike.xml")

# I use the first four bytes of computed hashes for directory names
./spool/hash[0..1]/hash[2..3]/mike.xml

In this way users' files will be uniformelly distributed all over tree, without risking of having too crowded or empty branches

--
Fabio Forno - PhD Student
Politecnico di Torino - Dip. Automatica ed Informatica
C.so Duca degli Abruzzi 24 - 10129 Torino (Italy)
Phone: +39 011 564 7137 - JabberId: [EMAIL PROTECTED]

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to