Hi.. I am setting up a new server (2GHz CPU, Ubuntu 8.10) and am using dovecot for an IMAP server. I have installed dovecot 1.1.4 and Squirrelmail 1.4.15. sudo dovecot -n shows this: # 1.1.4: /etc/dovecot/dovecot.conf log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login login_process_per_connection: no mail_privileged_group: mail auth default: passdb: driver: pam userdb: driver: passwd The problem I'm noticing is that if I do top -d 1 while clicking links in Squirrelmail (e.g., logging in, the Inbox link, opening a message), I see that a "dovecot-auth" process maximizes the CPU for about a second. While this is not a huge amount, it seems like with multiple users it could quickly bog down a server . Are there any recommendations or thoughts on what might cause the one-second CPU spike? -- or is that just normal operation? Thanks for your thoughts. - Joe Clark
Timo Sirainen
2009-Jan-08 22:43 UTC
[Dovecot] dovecot-auth Temporary But Frequent CPU Spike
On Tue, 2008-12-23 at 23:40 -0600, Joe Clark wrote:> auth default: > passdb: > driver: pam > userdb: > driver: passwd > > The problem I'm noticing is that if I do top -d 1 while clicking links > in Squirrelmail (e.g., logging in, the Inbox link, opening a message), I > see that a "dovecot-auth" process maximizes the CPU for about a second."dovecot-auth", not "dovecot-auth -w"?> Are there any recommendations or thoughts on what might cause the > one-second CPU spike? -- or is that just normal operation? Thanks for > your thoughts.Probably the most helpful thing would be if you could hook gdb into the dovecot-auth process: gdb -p <pid> cont Then wait until the CPU hits high and then immediately get gdb backtrace: ctrl-c bt full Do this a couple of times and send the backtraces. They'll hopefully show where it's waiting. Although if you see at the top that it's waiting on poll() or epoll_wait(), then that doesn't really help. If you can't get anything but those, try instead straceing the process and see if it logs something useful: strace -tt -p <pid> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090108/30dd66c4/attachment-0002.bin>