4 ms·
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. mb
by slaven 15y ago
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.
- __david__ 15y agoVery 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.
- slaven 15y agoYeap, hence "it beats mdir handily in one way" - mdir is way more modern and flexible.
- ars 15y agoWhy dramatically more? rsync does a perfectly fine job transmitting and storing just the diffs on an mbox file.
- __david__ 15y agoWith 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.
- ars 15y ago"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.