On Mon, 2010-08-30 at 17:38 +0200, Marinos Yannikos wrote:
I have a very large inbox (~146K mails) in Maildir format and dovecot seems to spend a lot of time rescanning the directory, especially when the server is loaded. I'm not sure whether this is triggered by Thunderbird or done regularly, but it takes longer when the server is loaded, so sometimes it seems that it is scanning continuously.
You could see if maildir_very_dirty_syncs=yes is helpful.
Since it takes around 2000 getdents64() syscalls to scan my inbox, I'm wondering whether the buffer size is a bit small with 4KB and might benefit from being configurable:
getdents64() is an internal kernel function and shouldn't be called directly (Dovecot uses readdir(), which is implemented with getdents64()). Also I doubt the buffer size is configurable and it probably wouldn't even help if a larger one was used, 2000 isn't yet that many syscalls.