[Dovecot] high imap load on large folders
Hello,
i sync with imapsync from an archiopteryx-server to an dovecot-server, for testing until now. The dovecot is inside an VM. storage for mail is on an nfs-share, indexes are local. What i now see, is, on large folder( 58000 messages and more) the load on the imap-process is very high, and slowdown the transferprocess. Is there something, I can do. Whats cause the high load ind the imap-process.
Here are the configuration, and below, a partial strace
# 1.2.4: /opt/dovecot/etc/dovecot.conf # OS: Linux 2.6.18-128.1.14.el5 i686 CentOS release 5.3 (Final) nfs base_dir: /var/run/dovecot/ ssl_cert_file: /opt/dovecot/etc/ssl/certs/dovecot.pem ssl_key_file: /opt/dovecot/etc/ssl/private/dovecot.pem login_dir: /var/run/dovecot/login login_executable: /opt/dovecot/libexec/dovecot/imap-login mail_max_userip_connections: 50 mail_location: maildir:/mnt/mail/%u/Maildir:INDEX=/var/spool/indexes/%u mailbox_idle_check_interval: 5 fsync_disable: yes mail_nfs_storage: yes lda: postmaster_address: postmaster@ghostdive.org hostname: mail.ghostdive.org mail_plugins: sieve mail_plugin_dir: /opt/dovecot/lib/dovecot/lda sendmail_path: /opt/postfix26/sbin/sendmail auth default: verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /opt/dovecot/etc/dovecot-sql.conf userdb: driver: passwd userdb: driver: sql args: /opt/dovecot/etc/dovecot-sql.conf socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: mailaccess group: mailaccess
strace output
close(7) = 0 munmap(0xb7255000, 2101248) = 0 munmap(0xb7c73000, 1052672) = 0 munmap(0xb7d74000, 528384) = 0 brk(0x84c1000) = 0x84c1000 time(NULL) = 1252311837 stat64("/mnt/mail/mail/ingoiwt/.wx-dev/cur", {st_mode=S_IFDIR|0700, st_size=3526656, ...}) = 0 pwrite64(8, "\0\0\0\0@\0\0\20\0\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\1\0\0\0\200\200\200\214"..., 92, 32720) = 92 pwrite64(8, "\200\200\200\207", 4, 32720) = 4 fstat64(8, {st_mode=S_IFREG|0600, st_size=32812, ...}) = 0 pread64(8, "\200\200\200\207@\0\0\20\0\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\1\0\0\0\200\200\200\214"..., 1024, 32720) = 92 pread64(8, "", 1024, 32812) = 0 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index", {st_mode=S_IFREG|0600, st_size=451180, ...}) = 0 fcntl64(9, F_SETLK64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb084c8) = 0 pread64(9, "\7\2x\0\320\0\0\0\f\0\0\0\1\0\0\0\22o\240J\0\0\0\0k\201\237J\316\222\0\0"..., 120, 0) = 120 pwrite64(9, "$\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0maildir\0\35\303\244J\22o\240J"..., 88, 120) = 88 pwrite64(9, "\316\222\0\0\10\0\0\0H\2064\0\317\222\0\0\10\0\0\0\234\2064\0\320\222\0\0\10\0\0\0"..., 1032, 451180) = 1032 pwrite64(9, "\7\2x\0\320\0\0\0\f\0\0\0\1\0\0\0\22o\240J\0\0\0\0k\201\237J$\223\0\0"..., 120, 0) = 120 fcntl64(9, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08518) = 0 fstat64(8, {st_mode=S_IFREG|0600, st_size=32812, ...}) = 0 umask(066) = 077 time(NULL) = 1252311837 lstat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log.newlock", 0xbfb081c0) = -1 ENOENT (No such file or directory) open("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log.newlock", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 7 fstat64(7, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 umask(077) = 066 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=32812, ...}) = 0 write(7, "\1\2(\0\22o\240J\226\1\0\0\225\1\0\0,\200\0\0\26\303\244J\0\0\0\0\0\0\0\0"..., 40) = 40 fstat64(7, {st_mode=S_IFREG|0600, st_size=40, ...}) = 0 alarm(180) = 0 fcntl64(7, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08388) = 0 alarm(0) = 180 unlink("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log.2") = 0 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=32812, ...}) = 0 link("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", "/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log.2") = 0 rename("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log.newlock", "/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log") = 0 fcntl64(8, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08498) = 0 fcntl64(7, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08658) = 0 alarm(180) = 0 fcntl64(7, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb085b8) = 0 alarm(0) = 180 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=40, ...}) = 0 fstat64(7, {st_mode=S_IFREG|0600, st_size=40, ...}) = 0 pread64(7, "", 1024, 40) = 0 fstat64(8, {st_mode=S_IFREG|0600, st_size=32812, ...}) = 0 time(NULL) = 1252311837 stat64("/mnt/mail/mail/ingoiwt/.wx-dev/cur", {st_mode=S_IFDIR|0700, st_size=3526656, ...}) = 0 rename("/mnt/mail/mail/ingoiwt/.wx-dev/tmp/1252311830.M363574P30566.devel5.ghostdive.org", "/mnt/mail/mail/ingoiwt/.wx-dev/cur/12523 11830.M363574P30566.devel5.ghostdive.org,W=5448:2,S") = 0 brk(0x8501000) = 0x8501000 _llseek(12, 0, [2365285], SEEK_END) = 0 _llseek(12, 0, [2365285], SEEK_CUR) = 0 fstat64(12, {st_mode=S_IFREG|0600, st_size=2365285, ...}) = 0 write(12, "37668 :1252311830.M363574P30566."..., 64) = 64 fstat64(12, {st_mode=S_IFREG|0600, st_size=2365349, ...}) = 0 pwrite64(7, "\0\0\0\0@\0\0\20\0\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\1\0\0\0\200\200\200\214"..., 92, 40) = 92 pwrite64(7, "\200\200\200\207", 4, 40) = 4 fstat64(7, {st_mode=S_IFREG|0600, st_size=132, ...}) = 0 pread64(7, "\200\200\200\207@\0\0\20\0\0\0\0\0\0\0\0$\0\0\0\0\0\0\0\1\0\0\0\200\200\200\214"..., 1024, 40) = 92 pread64(7, "", 1024, 132) = 0 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index", {st_mode=S_IFREG|0600, st_size=452212, ...}) = 0 umask(0) = 077 open("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.tmp", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 10 umask(077) = 0 fstat64(10, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 write(10, "\7\2x\0\320\0\0\0\f\0\0\0\1\0\0\0\22o\240J\0\0\0\0k\201\237J$\223\0\0"..., 208) = 208 write(10, "\1\0\0\0\10\0\0\0,\366\7\0\2\0\0\0\10\0\0\0<\366\7\0\3\0\0\0\10\0\0\0"..., 452004) = 452004 close(10) = 0 rename("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.tmp", "/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index") = 0 fcntl64(7, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08728) = 0 alarm(10) = 0 fcntl64(6, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08668) = 0 alarm(0) = 10 fstat64(6, {st_mode=S_IFREG|0600, st_size=3794944, ...}) = 0 pwrite64(6, "\0\0\0\0\\\0\0\0\f\0\0\0D\0\0\0,\0\0\0\0\0\0\0Message-"..., 92, 3449984) = 92 pwrite64(6, "\1\10\0\0\22o\240J{\266\240J\252\30\0\0\0\0\0\0\334\2444\0\0\0\0\0\200\200\200\210", 32, 0) = 32 fcntl64(6, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb086e8) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0 alarm(180) = 0 fcntl64(7, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb085f8) = 0 alarm(0) = 180 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=132, ...}) = 0 fstat64(7, {st_mode=S_IFREG|0600, st_size=132, ...}) = 0 pwrite64(7, "\0\0\0\0@\0\0\20\1\0\0\0{\266\240J\0\0\0\0\4\0\4\0\1\0\0\0\200\200\200\204"..., 104, 132) = 104 pwrite64(7, "\200\200\200\207", 4, 132) = 4 fcntl64(7, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb08668) = 0 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=236, ...}) = 0 fstat64(7, {st_mode=S_IFREG|0600, st_size=236, ...}) = 0 pread64(7, "\200\200\200\207@\0\0\20\1\0\0\0{\266\240J\0\0\0\0\4\0\4\0\1\0\0\0\200\200\200\204"..., 1024, 132) = 104 pread64(7, "", 1024, 236) = 0 lstat64("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist.lock", {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 unlink("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist.lock") = 0 epoll_ctl(5, EPOLL_CTL_DEL, 0, {0, {u32=136644264, u64=136644264}}) = 0 epoll_ctl(5, EPOLL_CTL_ADD, 0, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=136644264, u64=136644264}}) = 0 stat64("/mnt/mail/mail/ingoiwt/.wx-dev/new", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 stat64("/mnt/mail/mail/ingoiwt/.wx-dev/cur", {st_mode=S_IFDIR|0700, st_size=3526656, ...}) = 0 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=236, ...}) = 0 fstat64(7, {st_mode=S_IFREG|0600, st_size=236, ...}) = 0 time(NULL) = 1252311837 umask(0177) = 077 time(NULL) = 1252311837 lstat64("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist.lock", 0xbfb08530) = -1 ENOENT (No such file or directory) open("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist.lock", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 10 write(10, "30566:devel5.ghostdive.org", 26) = 26 fstat64(10, {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 close(10) = 0 lstat64("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist.lock", {st_mode=S_IFREG|0600, st_size=26, ...}) = 0 umask(077) = 0177 stat64("/mnt/mail/mail/ingoiwt/.wx-dev", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 chown32("/mnt/mail/mail/ingoiwt/.wx-dev", 20000, -1) = 0 open("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist", O_RDONLY|O_LARGEFILE) = 10 close(10) = 0 stat64("/mnt/mail/mail/ingoiwt/.wx-dev/dovecot-uidlist", {st_mode=S_IFREG|0600, st_size=2365349, ...}) = 0 fstat64(12, {st_mode=S_IFREG|0600, st_size=2365349, ...}) = 0 alarm(180) = 0 fcntl64(7, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}, 0xbfb085d8) = 0 alarm(0) = 180 stat64("/var/spool/indexes/ingoiwt/.wx-dev/dovecot.index.log", {st_mode=S_IFREG|0600, st_size=236, ...}) = 0 fstat64(7, {st_mode=S_IFREG|0600, st_size=236, ...}) = 0 open("/mnt/mail/mail/ingoiwt/.wx-dev/new", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 10 fstat64(10, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 fcntl64(10, F_SETFD, FD_CLOEXEC) = 0 fstat64(10, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 time(NULL) = 1252311837 getdents64(10, /* 2 entries */, 4096) = 48 getdents64(10, /* 0 entries */, 4096) = 0 close(10) = 0 open("/mnt/mail/mail/ingoiwt/.wx-dev/cur", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 10 fstat64(10, {st_mode=S_IFDIR|0700, st_size=3526656, ...}) = 0 fcntl64(10, F_SETFD, FD_CLOEXEC) = 0 fstat64(10, {st_mode=S_IFDIR|0700, st_size=3526656, ...}) = 0 time(NULL) = 1252311837 getdents64(10, /* 52 entries */, 4096) = 4048 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 brk(0x8541000) = 0x8541000 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4072 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 mmap2(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d74000 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4072 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4072 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 time(NULL) = 1252311840 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4072 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4080 getdents64(10, /* 51 entries */, 4096) = 4072 getdents64(10, /* 51 entries */, 4096) = 4080
On Mon, 2009-09-07 at 10:29 +0200, Ingo Thierack wrote:
What i now see, is, on large folder( 58000 messages and more) the load on the imap-process is very high, and slowdown the transferprocess. Is there something, I can do. Whats cause the high load ind the imap-process.
Is it actually the user CPU load or system CPU load? I'd think most of the time is spent on moving the new message to cur/ directory where there are the 58k messages.
mail_nfs_storage: yes
Disable this during the sync, it'll add delays. And if you don't have more than one NFS client accessing the same mailbox at the same time, you don't need it anyway.
Also see if maildir_very_dirty_syncs=yes helps.
strace output
strace -tt would have been better, it would have shown timestamps then too. But it didn't look like it did anything unexpected.
Timo Sirainen schrieb:
Is it actually the user CPU load or system CPU load? I'd think most of the time is spent on moving the new message to cur/ directory where there are the 58k messages.
Most time on System.
Cpu(s): 10.3%us, 87.1%sy, 0.0%ni, 1.7%id, 0.0%wa, 0.3%hi, 0.7%si,
0.0%st
Mem: 775148k total, 747620k used, 27528k free, 124464k buffers
Swap: 524280k total, 60k used, 524220k free, 186376k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
10573 mailacce 19 0 20732 17m 5616 R 96.1 2.3 2:13.57
imap
10566 ingo 15 0 283m 273m 3544 S 1.3 36.2 3:33.49
imapsync
10602 root 15 0 2364 956 756 R 0.7 0.1 0:00.44 top
mail_nfs_storage: yes
Disable this during the sync, it'll add delays. And if you don't have more than one NFS client accessing the same mailbox at the same time, you don't need it anyway.
Also see if maildir_very_dirty_syncs=yes helps.
set both parameter, no speedup. Im now on message 48000 and it takes around 5 seconds and more to transfer one message.
strace output
strace -tt would have been better, it would have shown timestamps then too. But it didn't look like it did anything unexpected.
found attached a short strace with -tt ;-) is it normal, that he spent so much in entries like
08:48:30.167492 getdents64(7, /* 51 entries */, 4096) = 4080
On Thu, 2009-09-10 at 09:06 +0200, Ingo Thierack wrote:
Also see if maildir_very_dirty_syncs=yes helps.
set both parameter, no speedup. Im now on message 48000 and it takes around 5 seconds and more to transfer one message.
What about after applying this patch:
On Thu, 2009-09-10 at 12:09 -0400, Timo Sirainen wrote:
On Thu, 2009-09-10 at 09:06 +0200, Ingo Thierack wrote:
Also see if maildir_very_dirty_syncs=yes helps.
set both parameter, no speedup. Im now on message 48000 and it takes around 5 seconds and more to transfer one message.
What about after applying this patch:
http://hg.dovecot.org/dovecot-1.2/rev/f2a6a99ff9ea also helps a bit on top of the previous patch.
the two patches are made it.
the imap process is now around 60-70%.
And now are transfered around 8 -10 messages per second.
Thanks for you help.
Ingo
Timo Sirainen wrote:
On Thu, 2009-09-10 at 12:09 -0400, Timo Sirainen wrote:
On Thu, 2009-09-10 at 09:06 +0200, Ingo Thierack wrote:
Also see if maildir_very_dirty_syncs=yes helps.
set both parameter, no speedup. Im now on message 48000 and it takes around 5 seconds and more to transfer one message.
What about after applying this patch:
http://hg.dovecot.org/dovecot-1.2/rev/f2a6a99ff9ea also helps a bit on top of the previous patch.
On Thu, 2009-09-10 at 23:19 +0200, Ingo Thierack wrote:
the two patches are made it.
the imap process is now around 60-70%.
And now are transfered around 8 -10 messages per second.
The next speedup would be to use some other method that uses MULTIAPPEND IMAP extension. That makes Dovecot do even less work. But unfortunately I'm not aware of any clients or sync tools that actually use it.
Oh and I guess you could also manually create multiple mailboxes and copy e.g. first 10k messages to box1, next 20k to box2, etc. and finally copy all of them into the same box.
Also Dovecot v2.0's upcoming multi-dbox file format will work very nicely with huge mailboxes. It can save about 1500-1800 msgs/sec at least up to 100k messages, probably up to a lot more.
participants (2)
-
Ingo Thierack
-
Timo Sirainen