* Derek D. Martin ([EMAIL PROTECTED]) wrote:

> At some point hitherto, Will Yardley hath spake thusly:
> > our office mail machine is (unfortunately) linux with ext2, and i
> > can attest to the fact that Maildir is pretty slow on ext2.
>
> And most other filesystems...  Try it on FAT.  =8^)

I think the overhead of opening and closing tonnes of small files is
inherintly going to be slower than one big file on reading.

Maildir is a simpler format for the MUA; one of mutt's advantages is with
mbox it does minimal writes, so for instance when it changes a status
flag, it just overwrites the old one, where as a lesser client may well
end up rewriting the entire mailbox from that point.  With Maildir, even
if the MUA rewrites the entire message each time the change is always
limited to one small file.

Maildir's advantages are in reliability (it's harder to corrupt 1000
small files than 1 big one), and modification cost
(moving/deleting/editing a message is a constant time operation, where
as mbox will potentially get slower as it gets bigger.  This isn't so
bad when the mailbox is small, or when you're modifying messages near
the end, but things like message archiving is going to be faster (and
easier) with maildir.

> > i haven't tried copying one of my large Maildir folders over to one
> > of my machines (FreeBSD, UFS filesystem with soft-updates) to see
> > how much faster it is, but i've heard that the difference is pretty
> > large.
>
> But how does it compare to mbox on the same FS?  I'll bet it's still
> significantly slower.

Well, I'm running FreeBSD 4.5 + UFS+FFS+SU and dirhashing, let's see..

I did try this a few months ago, btw, Maildir added about 25% to opening
time; good metadata caching could well make the difference here.
Personally, though, I'd use a minimal mbox type file over a dbm for that;
dbm's involve a lot of seeking, which is what we're trying to reduce :)

Anyway;

-% cat archive/2001/lists/cvs-all/11-2001.cvs-all
archive/2001/lists/cvs-all/12-2001.cvs-all >test-mbox
-% grep -c '^From ' test-mbox
7870

-% time mutt -Re 'push q<enter>' -f test-mbox
6.75s user 0.80s system 99% cpu 7.618 total

It took about a minute to convert to a mailbox;

-% mutt -Re 'push q<enter>' -f test-maildir
6.96s user 1.56s system 97% cpu 8.784 total

Those are cached values, though, so they're not really measuring
filesystem performance, soooo, let's malloc 300MB and fill it with
zero's, and:

-% mutt -Re 'push q<enter>' -f test-mbox
6.80s user 0.75s system 85% cpu 8.810 total

-% mutt -Re 'push q<enter>' -f test-maildir
7.39s user 2.38s system 32% cpu 29.882 total

Witness the overhead of all that seeking.

This is a Dual 466MHz Celeron w/ 384MB and a 20GB UDMA/33 drive.

-- 
Thomas 'Freaky' Hurst  -  [EMAIL PROTECTED]  -  http://www.aagh.net/
-
You've been telling me to relax all the way here,
and now you're telling me just to be myself?
                -- The Return of the Secaucus Seven

Reply via email to