Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 20:50:20 +0000
From:      Gustavo Vieira Goncalves Coelho Rios <gustavo@ifour.com.br>
To:        hackers@freebsd.org
Subject:   very big mail spool directory
Message-ID:  <3A368F8C.1918684F@ifour.com.br>

next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A368F8C.1918684F>