On 18.7.2007, at 19.03, Johannes Berg wrote:
On my server with many mails in one folder and slow IO, getting the
mail listing in the cur/ folder is becoming a serious bottleneck.
Dovecot is the only thing accessing the mail folders, so would there be any
way to avoid getting a listing all the time?
Well, there are two things:
Remove all dirty states from the code, so if Dovecot changes cur/
it doesn't later try to re-sync the maildir just in case someone else
had changed it. I actually thought about doing this and adding a
maildir_dirty_syncs setting, but then I thought if people want
performance they'll use dbox. :) (Or you could even remove timestamp
comparing completely to make sure it never reads cur/)If you want to avoid readdir() completely, then dovecot-uidlist
file needs to be rewritten each time a flag is changed so it would
always contain up-to-date filenames. That would make it do more writes.