Issue's with socketmap (smmapd) under heavy load?
Lenny
rahl at mindcryme.com
Wed Jul 14 14:32:53 EDT 2004
1) This looks odd to me, but here it is (ran through "time"):
time emecho "/map melen at logical.net" | sendmail -bt -d60.5 -d38.20
ldapmap_open(VirtHost, 0): opening new connection
ldapmap_lookup(VirtHost, )
ldapmap_close(VirtHost)
seq_map_parse(aliases.files, )
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> No key specified
>
real 0m0.026s
user 0m0.020s
sys 0m0.000s
2) smmapd cyrus.conf entry:
smmapd cmd="/usr/lib/cyrus-imapd/smmapd"
listen="/var/lib/imap/socket/socketmap" prefork=1
3) ulimit -a:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
I'm just having bizare problems. I have 2 frontends and 1 backend in a murder
configuration. If I have ANY kind of mail load incoming then the whole system
craps out (under what I'd consider very light load actually). I currently have
1 frontend setup to accept pop and imap connection and the other frontend
running sendmail and delivering mail via lmtp. If I turn on sendmail, then all
of a sudden my pop login times exceed 30 seconds. I'm quite at a loss. I don't
know if it's a frontend problem or a backend problem.
Here is my frontend imapd.conf:
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus cyrus at logical.net cyrus at logicalnet.com
sieveuserhomedir: no
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN DIGEST-MD5
tls_key_file: disabled
virtdomains: yes
defaultdomain: logicalnet.com
proxy_authname: cyrus
cyr-backend1_password: password
mupdate_server: mupdateip
mupdate_authname: cyrus
#mupdate_realm: logical.net
mupdate_password: password
allowusermoves: true
dracinterval: 5
drachost: newmail.logical.net
lmtp_over_quota_perm_failure: 1
quotawarn: 80
unixhierarchysep: yes
lmtp_downcase_rcpt: 1
duplicate_db: skiplist
ptscache_db: skiplist
tlscache_db: skiplist
allowapop: 0
Frontend (doing pop/imap) cyrus.conf:
# standard standalone server implementation
START {
# do not delete this entry!
recover cmd="ctl_cyrusdb -r"
# this is only necessary if using idled for IMAP IDLE
# idled cmd="idled"
}
# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
mupdate cmd="/usr/lib/cyrus-imapd/mupdate" listen=3905 prefork=1
# add or remove based on preferences
imap cmd="proxyd" listen="imap" prefork=5 maxchild=200
#imaps cmd="proxyd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=5 maxchild=200
#pop3s cmd="pop3d -s" listen="pop3s" prefork=1
sieve cmd="timsieved" listen="sieve" prefork=0
# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=3
# nntps cmd="nntpd -s" listen="nntps" prefork=1
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpproxyd" listen="/var/lib/imap/socket/lmtp" prefork=0
#lmtp cmd="lmtpproxyd" listen="/var/lib/imap/socket/lmtp" prefork=0
# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp"
prefork=1
smmapd cmd="/usr/lib/cyrus-imapd/smmapd"
listen="/var/lib/imap/socket/socketmap" prefork=1
}
EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30
# this is only necessary if using duplicate delivery suppression,
# Sieve or NNTP
delprune cmd="cyr_expire -E 3" at=0400
# this is only necessary if caching TLS sessions
tlsprune cmd="tls_prune" at=0400
}
Backend imapd.conf:
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus cyrus at logical.net cyrus at logicalnet.com
sieveuserhomedir: no
sievedir: /var/lib/imap/sieve
sendmail: /usr/sbin/sendmail
hashimapspool: true
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN DIGEST-MD5
tls_key_file: disabled
virtdomains: yes
defaultdomain: logicalnet.com
mupdate_server: mupdateip
mupdate_authname: cyrus
mupdate_password: password
proxyservers: cyrus cyrus at logical.net cyrus at logicalnet.com
allowusermoves: true
proxy_authname: cyrus
proxy_realm: logical.net
loginrealms: logical.net acmenet.net telenet.net empireone.net klink.net
uwdworld.net atecone.net grizzlyrun.com traderscreek.com fastbreakfund.org
fultoncomputer.net deciphertechnologies.com ppcs.net yourcaterer.com
the-alg.org mcphedge.com brow.cc nsclean.com privsoft.com wpe.com
corp.logical.net capital.net logicalnet.com
proxy_mechs: DIGEST-MD5
dracinterval: 0
lmtp_over_quota_perm_failure: 1
quotawarn: 80
unixhierarchysep: yes
lmtp_admins: cyrus at logical.net cyrus at logicalnet.com cyrus at acmenet.net
duplicate_db: skiplist
ptscache_db: skiplist
tlscache_db: skiplist
sasl_maximum_layer:0
allowapop: 0
Backend cyrus.conf:
# standard standalone server implementation
START {
# do not delete this entry!
recover cmd="ctl_cyrusdb -r"
mupdatepush cmd="ctl_mboxlist -m"
}
# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd -U 30" listen="imap" prefork=5 maxchild=300
#imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="/usr/lib/cyrus-imapd/pop3d" listen="pop3" prefork=5
maxchild=300
#pop3s cmd="pop3d -s" listen="pop3s" prefork=1
sieve cmd="timsieved" listen="sieve" prefork=0
# at least one LMTP is required for delivery
lmtp cmd="lmtpd -U 30" listen="lmtp" prefork=2
lmtpunix cmd="lmtpd -U 30" listen="/var/lib/imap/socket/lmtp" prefork=0
#smmapd cmd="/usr/lib/cyrus-imapd/smmapd"
listen="/var/lib/imap/socket/socketmap" prefork=1
}
EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30
# this is only necessary if using duplicate delivery suppression,
# Sieve or NNTP
delprune cmd="cyr_expire -E 3" at=0400
# this is only necessary if caching TLS sessions
tlsprune cmd="tls_prune" at=0400
}
Neither the backend or the frontend(s) are overloaded and the strace stuck on
socketmap is the only thing I've been able to find to explain why pop logins
take 30-60 seconds if there's incoming email. There are approximately 26,000
accounts on the backend.
Help :( I'm at wits end. Thank you.
Lenny
--
"Wisdom is to a man an infinite Treasure" - Anonymous"
Quoting Andrzej Filip <anfi at priv.onet.pl>:
> Lenny wrote:
>> I have a a MURDER setup and I notice that if the frontends are
>> getting any type
>> of mail load that sendmail takes over 30 seconds to send a small message
>> (sometimes over a minute). So I've picked a few "stuck" sendmails
>> and strace'd
>> them.
>> The strace just sits at the following:
>>
>> Process 9991 attached - interrupt to quit
>> connect(6, {sa_family=AF_FILE, path="/var/lib/imap/socket/socketmap"}, 110
>>
>> So it looks like my entire bottleneck has to do with socketmap
>> somehow. Is there
>> anyway I can speed things up? Thanks.
>
> 1) How long does it take to to query cyrus from "sendmail -bt" ?
>
> echo "/map cyrus user" | sendmail -bt -d60.5 -d38.20
>
> 2) Could you post smmapd entry from you cyrus.conf file ?
>
> 3) Could you post "cyrus user limits" ?
>
> as cyrus user execute "ulimit -a"
>
> --
> Andrzej [en:Andrew] Adam Filip anfi at priv.onet.pl anfi at xl.wp.pl
> http://anfi.homeunix.net/ http://anfi.homeunix.net/cyrus/
> ---
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list