Johannes Berg
2007-Jul-18 16:03 UTC
[Dovecot] avoiding getting maildir cur/ folder contents?
Hi, 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? johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070718/261a8c09/attachment-0002.bin>
Timo Sirainen
2007-Jul-18 20:45 UTC
[Dovecot] avoiding getting maildir cur/ folder contents?
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: 1) 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/) 2) 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. -------------- 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/20070718/79c0b57e/attachment-0002.bin>
Kyle Wheeler
2007-Jul-18 21:37 UTC
[Dovecot] avoiding getting maildir cur/ folder contents?
On Wednesday, July 18 at 06:03 PM, quoth Johannes Berg:> 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?I don't suppose improving your IO is an option? I find turning on dir_hashing in ext3, and mounting my maildirs with noatime, both significantly improve my performance without requiring me to buy new hardware. ~Kyle -- The fact that we live at the bottom of a deep gravity well, on the surface of a gas-covered planet going around a nuclear fireball 90 million miles away, and think this to be normal, is obviously some indication of how skewed our perspective tends to be... -- Douglas Adams -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20070718/1fdcc845/attachment-0002.bin>