[Dovecot] Speed up large maildirs

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


On 15.2.2005, at 21:13, John Peacock wrote:

> Timo Sirainen wrote:
>> 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.
>
> Well, yes, since Dovecot can't assume it's the only program accessing 
> the mailbox.  But my point is that Dovecot already knows that the 
> files in ./new are not in the index, so there is no point in telling 
> it about the messages (which is what the OP was suggesting).

Not necessarily.. :) I don't remember how 0.99.x did it, but 1.0-tests 
don't move mail from new to cur if

a) there's not enough disk space/quota to do it
b) the mailbox was opened read-only (or via SELECT or EXAMINE) so 
\Recent flag is kept

In both cases the message is indexed, assuming there's space to store 
indexes.

>> 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.
>
> That would be a database, right? ;-)

Basically the current indexes, with message bodies stored in one or 
more files depending on how configured, but without any duplicated 
metadata in them. Configuration would probably be "try to keep file 
sizes around 1MB" or "1 message per file".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20050215/77fdc929/attachment-0001.bin>


More information about the dovecot mailing list