[JDEV] Scaling 1.4.2 with xdb_file... And the patch
Fabio Forno
f.forno at kamin.polito.it
Fri Feb 28 10:02:04 CST 2003
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: sciasbat at jabber.linux.it
More information about the JDev
mailing list