Randall wrote regarding 'Re: [SLE] KMail question' on Wed, Aug 11 at 20:14: [... comparing size of maildir to mbox...]
...2001: %39 ...2002: %23 ...2003: %34 ...4004: %18
_That_'s why I prefer mbox to maildir!
Testing on my 6062 message inbox (a good mix of short messages and some long ones with: dsauer@danny-pc:~> df /tmp Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda2 116154428 53784568 62369860 47% / dsauer@danny-pc:~> grep hda2 /etc/mtab /dev/hda2 / reiserfs rw 0 0 dsauer@danny-pc:~> file /tmp/mbox /tmp/maildir/ /tmp/mbox: ISO-8859 mail text, with very long lines /tmp/maildir/: directory dsauer@danny-pc:~> du -hs /tmp/mbox /tmp/maildir/ 114M /tmp/mbox 127M /tmp/maildir/ dsauer@danny-pc:~> rm -r /tmp/maildir && df /tmp Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda2 116154428 53663144 62491284 47% / dsauer@danny-pc:~> echo '53784568-53663144' | bc 121424 dsauer@danny-pc:~> echo '(53784568-53663144)/1024' | bc 118 dsauer@danny-pc:~> rm /tmp/mbox && df /tmp Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda2 116154428 53546432 62607996 47% / dsauer@danny-pc:~> echo '(53663144-53546432)/1024' | bc 113 So, using Reiser, the maildir actualy only took up ~5MB more space, or about 4%. It's worth noting that, while there was 127MB of files, it was only taking up 118MB of space on a reiser filesystem. It's also worth noting that it took a little over 4 times as long to create the mbox file than it did the maildir files, even though the maildir was created first so those files were more likely to be alread cached. On a mailing list folder (no binary attachments) with 65591 messages, du reports 363MB, but it's actually only taking up 350MB of disk space (as compared to 280MB for the mbox). That's 25% less space, but it's just 25MB for well over 65 *thousand* messages. It's hard to find a drive that's less than 10GB now. Say that costs $100. That's $10/GB. Less than 1 cent per megabyte. The performance hit and file corruption risk on an mbox is not worth the 25 cents worth of disk space saved, IMHO. With an mbox, you've gotta do a lot of seeking to find the message you're interested in (or pre-scan the file generating file offsets at the time of opening). With maildir, you list a directory and go to the file corresponding to your message. 6000 messages in a folder? It takes a long time to read that 114MB text file, but not so long to read the contents of 2 directories. :) Scenario: A file is open and being written to when the computer loses power due to the UPS malfunctioning. That file is only half written, and the journal didn't manage to catch it. The file's corrupted. Results: mbox - all mail is in one file, a bunch is lost due to the failure. maildir - one message per file, part of one message is lost due to the failure. Disks are cheap, esp for a 5MB difference. Data recovery time is not. _That_'s (a few reasons) why I prefer maildir. :) --Danny