Has anyone ever considered the possibility of using the Maildir format in a
manner similar to the qmail queue directories?  That is, make it hashed
somehow to cut down on the number of files in any one directory?  I realize
one of the big wins of Maildir is that you never have to worry about
locking anywhere, and I've already thought of a couple cases where avoiding
locking might be tricky.

Along those lines, I've read the discussions about patching qmail to handle
"big" queue directories, and I'm wondering if it would be possible to
dynamically grow the queue directories as needed.  My idea is to make it
work similar to the Unix method for allocating disk blocks; the "indirect"
blocks would be analogous to a deeper directory structure.

I think this could improve the apparent performance of qmail, if not the
real performance.  Instead of every process waiting on the kernel to
synchronize access to a large directory, the individual qmail processes
would have to navigate the directories themselves.  This would break up the
"long" system calls to read directory info into more "short" calls to
change directories, which would cut down on the time that the kernel is
locked.

This is just sorta brainstorming right now, I haven't really thought about
it that much but I'd like to hear what others have to say.  I have to deal
with postmaster mail here, and a couple times I've arrived to 20,000
messages in my Maildir.  Trying to deal with that takes down our NFS server
(we store Maildirs on a central server), and although I can get on the
machine itself and run some shell scripts to wipe most of it, if a customer
ever got that much mail we'd have problems, so I'd like to find a way to
ensure that the Maildir won't get unmanageably big.

shag
=====
Judd Bourgeois        |   CNM Network      +1 (805) 520-7170
Software Architect    |   1900 Los Angeles Avenue, 2nd Floor
[EMAIL PROTECTED]   |   Simi Valley, CA 93065
...yours is not the less noble because no drum beats before you when
you go out into your daily battlefields, and no crowds shout about your
coming when you return from your daily victory or defeat.
     --Robert Louis Stevenson


----- Original Message -----
From: Sam <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thu 15 Jul 1999 14.54
Subject: Re: Advantages with qmail and using reiserfs???


> John Gonzalez/netMDC admin writes:
>
> > Maildir works (about as best as can be expected) over NFS
> >
> > But that really is a solution _I_ wouldnt like to go with.
> >
> > There also might be some kernel hacking you can do that can cope better
> > with many filenames in one directory, etc.
>
> If you're only talking about Maildir, the solution to a large Maildir is
to
> refile the mail into multiple folders.
>
> I do not believe that using Maildirs uses up more inodes than an average
> filesystem.  Most filesystems allocate one inode per 4096 bytes, which
> happens to be approximately the average size of an E-mail message.  My
> experience with Maildirs is that they scale to about a thousand messages
on
> a system with average CPU horsepower and reasonably fast SCSI disks.
> Anything more than a thousand messages, and you should start thinking
about
> folder management.
>
>
>
> --
> Sam
>
>

Reply via email to