[Dovecot] Speed up large maildirs

Timo Sirainen tss at iki.fi
Tue Feb 15 21:00:29 EET 2005


On Tue, 2005-02-15 at 13:49 -0500, John Peacock wrote:
> Leen Besselink wrote:
> > If someone would make a wrapper-program around the delivery-program (like qmail-local,
> > vpopmaildeliver, procmail or local and virtual from postfix) and the delivery program would
> > print to standard output the path+filename it saved a (or more) message(s) to, the wrapper
> > would be able to send an update-message to a dovecot-daemon.
> 
> I don't understand how this would be an improvement.  Currently, when 
> dovecot opens a "folder" the first thing it does is open folder/new and 
> moves those files to folder/cur, presumably updating the index as it 
> goes.  That is as fast as it could ever get.

Well, with 0.99.x it does more than what client needs, and it might have
to read through all the messages twice. So 1.0-tests might half the time
needed to open a mailbox, or even more.

> The files in ./new are guaranteed to be, well, NEW, so they are 
> the ones that dovecot needs to add to its own index, to avoid having to 
> open the ./cur folder and enumerate all files every single time.

Actually Dovecot looks at cur too every time its timestamp has changed.
So moving the mail from new/ to cur/ means Dovecot will scan through the
cur/ within a couple of seconds. The scan should be pretty fast though.

The optimal solution anyway will be Dovecot's own mail format at some
point, delivered through Dovecot LDA which indexes the mail immediately
while storing it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20050215/39f40bf8/attachment-0001.bin>


More information about the dovecot mailing list