Angel L. Mateo
2012-Sep-05 11:40 UTC
[Dovecot] Resynchronization of indexes (or Warning: Maildir Scanning <dir> took <X> seconds)
Hello, We have a dovecot servers farm with storage in NFS and indexes in local files. Under heavy load conditions we a log of messages in the form: Sep 3 12:35:49 myotis32 dovecot: imap(<imapuser>): Warning: Maildir: Scanning <maildir cur directory> took 62 seconds (9516 readdir()s, 0 rename()s to cur/, why=0x80) We have check that messages are directed with lmtp to the same server the user (scenario 3 at http://wiki2.dovecot.org/NFS with director in front of backend servers). So my question is why is dovecot using these readdirs operations? why it is scanning the whole cur directory of the user? I guess this is an index resynchronization, but I don't know could it be the cause. PS: I have attached my dovecot -n output -------------- next part -------------- # 2.1.9: /etc/dovecot/dovecot.conf # OS: Linux 3.2.19um1 x86_64 Ubuntu 12.04.1 LTS auth_cache_size = 20 M auth_cache_ttl = 1 days auth_debug = yes auth_master_user_separator = * auth_verbose = yes default_process_limit = 1024 disable_plaintext_auth = no log_timestamp = %Y-%m-%d %H:%M:%S login_trusted_networks = 155.54.211.176/28 mail_debug = yes mail_location = maildir:~/Maildir:INDEX=/var/indexes/%n mail_privileged_group = mail mdbox_rotate_size = 20 M namespace { inbox = yes location = prefix = separator = . } namespace { hidden = yes list = no location = maildir:~/Maildir/expunged prefix = BORRADOS. separator = . } passdb { args = /etc/dovecot/master-users driver = passwd-file master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } passdb { args = session=yes dovecot driver = pam } plugin { lazy_expunge = BORRADOS. quota = maildir:User quota quota_rule = *:storage=20G quota_rule2 = Trash:storage=+1G sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_extensions = +imapflags sieve_max_redirects = 15 zlib_save = gz zlib_save_level = 6 } postmaster_address = postmaster at um.es service anvil { client_limit = 2051 } service auth { client_limit = 3072 unix_listener auth-userdb { mode = 0666 } } service doveadm { inet_listener { port = 24245 } } service imap { process_limit = 5120 process_min_avail = 6 vsz_limit = 512 M } service ipc { unix_listener ipc { user = dovecot } } service lmtp { inet_listener lmtp { port = 24 } process_min_avail = 10 vsz_limit = 512 M } service pop3 { process_min_avail = 6 } ssl = no ssl_cert = </etc/ssl/certs/dovecot.pem ssl_key = </etc/ssl/private/dovecot.pem userdb { args = username_format=%Ln /etc/dovecot/usersdb.%s driver = passwd-file } userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } protocol lda { mail_plugins = " sieve" } protocol lmtp { mail_plugins = " sieve" } protocol pop3 { pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, in=%i, out=%o } local 155.54.211.160/27/27 { doveadm_password = <password> }
Timo Sirainen
2012-Sep-05 11:50 UTC
[Dovecot] Resynchronization of indexes (or Warning: Maildir Scanning <dir> took <X> seconds)
On 5.9.2012, at 14.40, Angel L. Mateo wrote:> Sep 3 12:35:49 myotis32 dovecot: imap(<imapuser>): Warning: Maildir: Scanning <maildir cur directory> took 62 seconds (9516 readdir()s, 0 rename()s to cur/, why=0x80) > > We have check that messages are directed with lmtp to the same server the user (scenario 3 at http://wiki2.dovecot.org/NFS with director in front of backend servers). > > So my question is why is dovecot using these readdirs operations? why it is scanning the whole cur directory of the user? I guess this is an index resynchronization, but I don't know could it be the cause.That's the way Maildir works. If Dovecot is the only one accessing the maildir, you can set maildir_very_dirty_syncs=yes to reduce how often readdir()s are done (but it doesn't completely eliminate them in all situations).