On Sun, Jun 05, 2005 at 04:06:42PM -0700, Steve Lamb wrote: > It is not a silly response, it is factual. 500Mb of mail at an > average of 5Kb per message is 100,000 messages. 100,000 files in > a single directory is not "more efficient for individual deletes"
Okay, at the risk of starting a flame war, it's still silly. Allowing users to have 100,000 messages in a single directory is insane, and is purely the fault of the administrator for not forcing users to download, sort, archive, or otherwise deal with their mail in a sensible way. Use inode quotas, for goodness sakes. That said, a modern filesystem such as XFS or ReiserFS gives pretty good performance even on directories with tens of thousands of entries. Moving 100,000 emails into a single file just shuffles the problem around. Appending to an mbox is reasonably efficient. But instead of inode consumption, you have CPU spikes when email applications try to locate individual emails inside a single huge text file, or disk spikes when someone deletes a single email out of the mbox and the other 99,999 emails need to get written back out to disk. All that is somewhat irrelevent, though, in that maildir was not designed to provide better performance (although it can, in some cases), but to provide guarantees that all messages are safely written to disk. It protects against file-locking issues, allows MUAs to flag messages individually, and allows for manipulation (e.g. editing or deletion) of individual messages without affecting others messages. In short, its primary goal is data availability. You've really made my point point for me: the benefit of mbox or maildir is heavily dependent on its usage. In your case, because of the *way* you and your users manage mail on your systems, mbox makes sense in your environment. For other environments, maildir offers a different set of optimizations that can improve performance and reliability. Personally, I use both, for different reasons and in places where they make sense. Always use the right tool for the job at hand; zealotry is inefficient. -- Re-Interpreting Historic Miracles with SED #141: %s/water/wine/g -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]