George Kahler wrote:
Q: Will mbx buy me performance on the toaster ? Q: Is Maildir a better choice ?
As in all difficult questions the answer is "it depends." People have given some very good reasons on why maildir is an appropriate choice given certain constraints, so let me mention a few things that favor mbox-format mail storage on a filer. We run several tens of millions of user mailboxes on a fleet of NetApps for YahooMail and so here are a few other points to consider that we have run into over the past few years:
1) Locking is a dead issue for mbox. There is no way to adequately provide file locking via the standard channels so you will probably need to deal with the locking issue as a seperate problem. We ended up writing our own mailbox locking system but you might be able to use procmail for as your local delivery agent and let that try to figure out the locking issues. Locking is important, but do not fixate on this issue and ignore all of the other points that you need to consider.
2) Inode cost should not be overlooked. You get at most 32 million per volume, so if you have a lot of mailboxes a maildir or other one-file-per-message scheme will chew through your inode limit long before you run out of disk space on that volume. To compensate you will have to make smaller volumes. This is not necessarily a bad thing but each volume will be at least one additional raid group and on additional wasted parity disk (increased cost/mailbox). The larger number of inodes in use will also increase the time it takes your filer to complete a wack run and will have an impact on backup speeds.
3) Mail messages are small. There is a simple bimodal distribution to internet mail message size, they are either very small or very large. The small files will cost you storage bits because the filer uses 4K to store each 500byte message. The small file sizes will also keep your read chain length very low so we will get significantly decreased performance on your backups of this volume and you will notice some decreased read performance on the filer in general.
jim