-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday, 2014-08-20 at 16:57 -0700, Linda Walsh wrote:
It might come down to usage, but putting each message in a separate file generally will waste space, time, resources... human time and cpu time...
As everything in engineering, things have different sides. Things have both advantages and disadvantages. Yes, maildir is slower on some operations, like searches, or anything that requiries reading or writing a whole folder. On the other hand, it is faster at deleting emails, or adding them. Specially deleting an email: in mbox, it means copying the file, and skipping one chunk - or marking some chunks as deleted, and do the actual deletion when the folder is compacted (in thunderbird you do this operation explictly; if you don't, folders grow huge). Then mbox is faster in normal operation (reading, browsing), it is more compact. But a file corruption could destroy the whole folder (never happened to me). However, being a plain text file, it can be probably reconstructed. On maildir, a file corruption damages a single email. Then there are more advanced, newer formats: for instance, you can combine both methods, and have a bunch of posts in the same file up to some acceptable limit, and then switch to another file. For instance, Pine and uw-imap has one such format, called "mix" (http://en.wikipedia.org/wiki/MIX_%28Email%29). And dovecot has "mdbox" (I believe MIX is better). And all are mutually incompatible, not suported by other components :-( I knew this since years, but you have a very nice summary here: http://wiki2.dovecot.org/MailboxFormat Maildir is widely suported, yes. But mbox is still the only one universally supported format.
Here is the result of putting 238940 in a folder. Each of them are 1k long -- an average email message. I am using a larger number than one would normally have in a folder to allow comparison of methodology, not that email clients using email would have this many messages in 1 folder.
If you run the comparison on reiserfs, the figures are not that different.
That it takes almost 4x the space is bad enough, but that it 200-300 times slower is the real bear.
Some operations are faster - like deleting. Compacting is not needed. Ah, but you forget the huge number of inodes used :-p - -- Cheers, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlP1VoQACgkQtTMYHG2NR9XTlQCeNuapl+OcmvpsVvHtTW2p6o4i tpoAnRswRLfa8puOjjAozx7E/glGfsWL =FqoC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org