Hi folks,

i am planning a very big email server, currently i am planning for about
8*2^16 users.

I known that ufs has not good performance for very big directories,
i.e., using a single directory to hold too many entries may lead to a
low level performance.Since, my approach is to hash the spool mail dir
for my users.

Every user will have a single id that will map it's email address into a
unique directory, this later will hold the user maildir. My spool mail
dir is: /var/qmail/mail and all directory will be created within' it.

The functions that will hash the id, accepts an id as input and returns
a string for the user dir, like:

Id              String returned
0               0/0/0/0/0/0/0/0
1               0/0/0/0/0/0/0/1
.               ./././././././.
15              0/0/0/0/0/0/0/f
16              0/0/0/0/0/0/1/0
17              0/0/0/0/0/0/1/1
.               ./././././././.
32              0/0/0/0/0/0/2/0
.               ./././././././.


Got the ideia ? This allow me to perform at most 8*16 lookup_dir routine
to get the users mails. So, my approach only works better for a number
of users bigger than 96 in traditional /var/mail (that creates one file
for each user, what can make performance drop down for a large amount of
users). I believe my approach is very good, since if you have (for
instance) 2^32 users, seeking the user dir would not take too much time!
Any way i would really enjoy your comments.

What you wizard have to say about my approach?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to