News for hackers. Stuff that matters.
Re:"mbox" is a family of several mutually incompatible mailb... by ZenPsycho on Saturday January 07, 2012 @08:24PM (#3438584)
way more efficient along which dimension? Space, or processing speed? By roughly how much? Enough to be worth the costs in potential data loss?
Re:"mbox" is a family of several mutually incompatible mailb... by sliverstorm on Saturday January 07, 2012 @08:30PM (#3438594)
Efficient use of inodes, perhaps?
Re:"mbox" is a family of several mutually incompatible mailb... by slaven on Saturday January 07, 2012 @08:33PM (#3438599)
Each mdir email is a file, so depending on your OS it consumes disk fragments very quickly and relies on your OS file handlers to allocate and load messages. mbox as a mapped file and a good index blows it away in speed and space usage.
Re:"mbox" is a family of several mutually incompatible mailb... by __david__ on Saturday January 07, 2012 @08:59PM (#3438637)
Very true, but reclaiming space in the middle of a huge mailbox is dramatically worse in the mbox case.

Doing time-machine style rsync backups is also dramatically more space efficient in the maildir case.

Re:"mbox" is a family of several mutually incompatible mailb... by ars on Saturday January 07, 2012 @09:49PM (#3438730)
Why dramatically more? rsync does a perfectly fine job transmitting and storing just the diffs on an mbox file.
Re:"mbox" is a family of several mutually incompatible mailb... by __david__ on Saturday January 07, 2012 @10:28PM (#3438795)
With the time-machine style backups, every time you append an email to your mbox the whole thing gets backed up. Yes, the rsync protocol makes the wire transmission efficient (only really matters if your backup server is remote) but the fact that your 2Gig mbox file gets backed up every night instead of hard-linked means it's not space effective on your backup disk.

A mail-dir, on the other hand, works nicely with this type of backup. All the old mails never change so they get hard-linked and only the new mails take up any new space on the backup.

Re:"mbox" is a family of several mutually incompatible mailb... by ars on Saturday January 07, 2012 @10:41PM (#3438817)
"time-machine style backup" seems to be a marketing term, not a type of backup.

Do you mean a hard link style backup? Where diffs are never stored, you just keep making hard links of the files? And if they change even one byte you store the file fresh?

There are plenty of solutions to this, the simplest being storing reverse diffs - so the latest file is stored plain, but older ones can be generated from diffs (since doing so is rare).

You can also use modern filesystems like btrfs that can do COW and block de-duplication and store only changed blocks in such a way that the file appears to be complete, but actually stores only what changed.

Re:"mbox" is a family of several mutually incompatible mailb... by slaven on Saturday January 07, 2012 @09:04PM (#3438646)
Yeap, hence "it beats mdir handily in one way" - mdir is way more modern and flexible.