[Dovecot] Speed up large maildirs

Leen Besselink leen at wirehub.nl
Tue Feb 15 20:52:29 EET 2005


John Peacock zei:
> 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.
>

But if you do it all at ones, it's gonna take time (the user needs to wait, till this is done)

> Perhaps a short description of how Maildirs work (as I understand it) is
> in order:
>
> 1) an external application creates a files in ./tmp (this is the one
> time-consuming operation and it is not guaranteed to be atomic);
>
> 2) the same application then renames that file into the ./new folder
> (this is atomic);
>
> 3) another application (say dovecot) opens the Maildir for reading and
> moves any files from ./new to ./cur (since this neatly corresponds to
> "new" files as opposed to previously seen files).
>
> How would some additional information to the dovecot-daemon help in any
> way?  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.
>

The fun thing is, when you read a message, the filename in cur get's changed, so new only
means, not moved and indexed (as I understand it).

> John
>
> --
> John Peacock
> Director of Information Research and Technology
> Rowman & Littlefield Publishing Group
> 4501 Forbes Boulevard
> Suite H
> Lanham, MD  20706
> 301-459-3366 x.5010
> fax 301-429-5748
>
>


_____________________________________
New things are always on the horizon.




More information about the dovecot mailing list