Hi All,
I have compared Dovecot performance to Courier and it appears that as a POP3
server Dovecot is slower in 2 times but as an IMAP server it is faster in 1.5
times. The same node (16CPUs), testing time is 30 min, please see results and
dovecot configs attached.
Benchmark software is MStone used by Sendmail Inc so is is quite reliable.
I do not see anything else to tweak in Dovecot to increase POP3 performance.
Can we all have some tips to improve it please ?
This is how my Dovecot set up:
(LDAP user) -> Dovecot Director -> (Master user) -> Dovecot
Dovecot Director:
dovecot-shared-4:~# /usr/local/dovecot/bin/doveconf -n -c
/usr/local/dovecot/etc/dovecot/dovecot-proxy.conf
# 2.1.12: /usr/local/dovecot/etc/dovecot/dovecot-proxy.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.6
auth_debug = yes
auth_mechanisms = plain login cram-md5 ntlm
auth_verbose = yes
base_dir = /var/run/dovecot-proxy
default_internal_user = webmail
director_mail_servers = 192.168.100.102
director_servers = 192.168.100.101
disable_plaintext_auth = no
doveadm_password = blah
doveadm_proxy_port = 9292
instance_name = dovecot-proxy
listen = 192.168.100.101
log_path = /var/log/dovecot-proxy.log
login_greeting = Dovecot Proxy ready.
mail_location = maildir:~/
passdb {
args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
service auth-worker {
user = webmail
}
service auth {
client_limit = 2400
}
service director {
fifo_listener login/proxy-notify {
mode = 0666
}
inet_listener {
port = 9191
}
unix_listener director-userdb {
mode = 0600
}
unix_listener login/director {
mode = 0666
}
}
service doveadm {
inet_listener {
port = 9292
}
}
service imap-login {
executable = imap-login director
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service imap {
service_count = 0
}
service lmtp {
inet_listener lmtp {
port = 24
}
}
service pop3-login {
executable = pop3-login director
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
service pop3 {
service_count = 0
}
ssl_cert = </usr/local/dovecot/ssl/dovecot.pem
ssl_key = </usr/local/dovecot/ssl/dovecot.pem
userdb {
args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
protocol imap {
mail_max_userip_connections = 100
}
protocol doveadm {
auth_socket_path = director-userdb
}
Dovecot (back-end):
dovecot-shared-4:~# /usr/local/dovecot/bin/doveconf -n
# 2.1.12: /usr/local/dovecot/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.6
auth_debug = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_verbose = yes
base_dir = /var/run/dovecot/
default_internal_user = webmail
disable_plaintext_auth = no
doveadm_password = blah
listen = 192.168.100.102
log_path = /var/log/dovecot.log
mail_fsync = always
mail_location = maildir:~/
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = " quota fts fts_lucene"
mmap_disable = yes
namespace {
inbox = yes
location =
prefix = INBOX.
separator = .
}
passdb {
args = /usr/local/dovecot/etc/dovecot/passwd.masterusers
driver = passwd-file
master = yes
pass = yes
}
passdb {
driver = static
}
plugin {
fts = lucene
fts_lucene = whitespace_chars=@.
quota = maildir:User quota
}
service director {
unix_listener director-admin {
mode = 00
}
}
service doveadm {
inet_listener {
port = 9292
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
process_limit = 20
process_min_avail = 8
}
service imap-postlogin {
executable = script-login /usr/local/dovecot/bin/imap-postlogin.sh
user = webmail
}
service imap {
executable = imap imap-postlogin
}
service lmtp {
inet_listener lmtp {
port = 24
}
}
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
process_limit = 20
process_min_avail = 8
}
service pop3-postlogin {
executable = script-login /usr/local/dovecot/bin/pop3-postlogin.sh
user = webmail
}
service pop3 {
executable = pop3 pop3-postlogin
}
ssl_cert = </usr/local/dovecot/ssl/dovecot.pem
ssl_key = </usr/local/dovecot/ssl/dovecot.pem
userdb {
args = /usr/local/dovecot/etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
protocol imap {
mail_plugins = " quota fts fts_lucene imap_quota"
}
Best Regards,
Alexandr Sabitov
Netregistry
---- MStone Results 20130116.1333 ----
NR Courier POP3 Test
Some sort of testing...
Test duration: 30 minutes. Rampup: 20 seconds. Reported duration 30.0min
Number of reporting clients: 1 of 1
POP3 Try Error BytesR BytesW
Time TMin TMax TStd
POP3:blocks 27715
POP3:total 249432 0 1237641991 2232351
0.007 0.001 1.182 0.018
POP3:connect 27715 0 0 0
0.002 0.001 1.001 0.013
POP3:banner 27715 0 498870 0
0.007 0.002 0.425 0.015
POP3:login 27715 0 443440 388010
0.013 0.004 1.182 0.035
POP3:command 55430 0 1025455 1012915
0.002 0.001 0.210 0.003
POP3:submit 0 0 0 0
0.000 0.000 0.000 0.000
POP3:retrieve 83142 0 1235286216 665136
0.013 0.005 0.650 0.019
POP3:logout 27715 0 388010 166290
0.002 0.001 0.210 0.003
POP3:idle 0 0 0 0
0.000 0.000 0.000 0.000
POP3 Try/min Error/min BytesR/sec BytesW/sec
POP3:blocks/m 15.397
POP3:total/m 8314.400 0.000 687578 1240
POP3:connect/m 923.833 0.000 0 0
POP3:banner/m 923.833 0.000 277 0
POP3:login/m 923.833 0.000 246 215
POP3:command/m 1847.667 0.000 569 562
POP3:submit/m 0.000 0.000 0 0
POP3:retrieve/m 2771.400 0.000 686270 369
POP3:logout/m 923.833 0.000 215 92
POP3:idle/m 0.000 0.000 0 0
---- MStone Results 20130116.1439 ----
NR Courier IMAP Test
Some sort of testing...
Test duration: 30 minutes. Rampup: 20 seconds. Reported duration 30.0min
Number of reporting clients: 1 of 1
IMAP4 Try Error BytesR BytesW
Time TMin TMax TStd
IMAP4:blocks 12377
IMAP4:total 185647 0 9740526 1900461
0.010 0.001 3.819 0.021
IMAP4:connect 12377 0 0 0
0.002 0.001 1.001 0.009
IMAP4:banner 12377 0 2995234 0
0.005 0.002 3.819 0.035
IMAP4:login 12377 0 198032 514306
0.015 0.005 1.319 0.047
IMAP4:command 136139 0 5742756 1250009
0.011 0.001 0.738 0.016
IMAP4:submit 0 0 0 0
0.000 0.000 0.000 0.000
IMAP4:retrieve 0 0 0 0
0.000 0.000 0.000 0.000
IMAP4:logout 12377 0 804504 136146
0.002 0.001 0.207 0.003
IMAP4:idle 0 0 0 0
0.000 0.000 0.000 0.000
IMAP4 Try/min Error/min BytesR/sec BytesW/sec
IMAP4:blocks/m 6.876
IMAP4:total/m 6188.233 0.000 5411 1055
IMAP4:connect/m 412.567 0.000 0 0
IMAP4:banner/m 412.567 0.000 1664 0
IMAP4:login/m 412.567 0.000 110 285
IMAP4:command/m 4537.967 0.000 3190 694
IMAP4:submit/m 0.000 0.000 0 0
IMAP4:retrieve/m 0.000 0.000 0 0
IMAP4:logout/m 412.567 0.000 446 75
IMAP4:idle/m 0.000 0.000 0 0
---- MStone Results 20130116.1614 ----
Dovecot POP3 Test
Some sort of testing...
Test duration: 30 minutes. Rampup: 20 seconds. Reported duration 30.0min
Number of reporting clients: 1 of 1
POP3 Try Error BytesR BytesW
Time TMin TMax TStd
POP3:blocks 12259
POP3:total 110328 0 547033473 987412
0.016 0.001 2.438 0.056
POP3:connect 12259 0 0 0
0.002 0.001 1.002 0.016
POP3:banner 12259 0 318734 0
0.018 0.006 1.208 0.053
POP3:login 12259 0 196144 171626
0.074 0.022 2.438 0.137
POP3:command 24518 0 220662 448040
0.002 0.001 0.213 0.002
POP3:submit 0 0 0 0
0.000 0.000 0.000 0.000
POP3:retrieve 36774 0 546077271 294192
0.016 0.005 0.804 0.031
POP3:logout 12259 0 220662 73554
0.002 0.001 0.212 0.003
POP3:idle 0 0 0 0
0.000 0.000 0.000 0.000
POP3 Try/min Error/min BytesR/sec BytesW/sec
POP3:blocks/m 6.811
POP3:total/m 3677.600 0.000 303907 548
POP3:connect/m 408.633 0.000 0 0
POP3:banner/m 408.633 0.000 177 0
POP3:login/m 408.633 0.000 108 95
POP3:command/m 817.267 0.000 122 248
POP3:submit/m 0.000 0.000 0 0
POP3:retrieve/m 1225.800 0.000 303376 163
POP3:logout/m 408.633 0.000 122 40
POP3:idle/m 0.000 0.000 0 0
---- MStone Results 20130116.1644 ----
Dovecot IMAP Test
Some sort of testing...
Test duration: 30 minutes. Rampup: 20 seconds. Reported duration 30.0min
Number of reporting clients: 1 of 1
IMAP4 Try Error BytesR BytesW
Time TMin TMax TStd
IMAP4:blocks 16005
IMAP4:total 240065 0 17300886 2457425
0.007 0.001 2.564 0.037
IMAP4:connect 16005 0 0 0
0.002 0.001 0.999 0.014
IMAP4:banner 16005 0 2448765 0
0.015 0.006 1.207 0.043
IMAP4:login 16005 0 5409690 664958
0.075 0.039 2.564 0.114
IMAP4:command 176045 0 8738212 1616413
0.002 0.001 0.404 0.006
IMAP4:submit 0 0 0 0
0.000 0.000 0.000 0.000
IMAP4:retrieve 0 0 0 0
0.000 0.000 0.000 0.000
IMAP4:logout 16005 0 704219 176054
0.002 0.001 0.203 0.002
IMAP4:idle 0 0 0 0
0.000 0.000 0.000 0.000
IMAP4 Try/min Error/min BytesR/sec BytesW/sec
IMAP4:blocks/m 8.892
IMAP4:total/m 8002.167 0.000 9611 1365
IMAP4:connect/m 533.500 0.000 0 0
IMAP4:banner/m 533.500 0.000 1360 0
IMAP4:login/m 533.500 0.000 3005 369
IMAP4:command/m 5868.167 0.000 4854 898
IMAP4:submit/m 0.000 0.000 0 0
IMAP4:retrieve/m 0.000 0.000 0 0
IMAP4:logout/m 533.500 0.000 391 97
IMAP4:idle/m 0.000 0.000 0 0