Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Feb 2002 02:18:33 -0800 (PST)
From:      "Michael D. Allen" <mallen@erhs.la>
To:        <freebsd-questions@freebsd.org>
Subject:   Very sluggish sendmail
Message-ID:  <20020216020603.P1045-100000@the-rock.lausd.k12.ca.us>

next in thread | raw e-mail | index | archive | help
Hi, I was wondering if someone had any ideas in helping to solve a
sendmail problem I'm having.

I'm running stock sendmail from FreeBSD 4.4, and sendmail is extremely
sluggish.  Running mailq takes a good 30 seconds on an idle Pentium III
with an empty mail queue:

91$ time mailq
/var/spool/mqueue is empty

real    0m30.818s
user    0m0.014s
sys     0m0.008s

DNS is correctly configured, and I'm using NIS, but that works fine and
speedy as well.  Using the sendmail.cf that comes with FreeBSD 4.4 or my
own sendmail.cf doesn't make any difference.

I've ktrace'd sendmail -bp to see what it was hanging on, and it seems
the hanging occurs at 3 kevent calls.  Here's an excerpt of the trace:

   432 sendmail 0.000091 CALL  kqueue
   432 sendmail 0.000012 RET   kqueue 3
   432 sendmail 0.000009 CALL  socket(0x2,0x2,0)
   432 sendmail 0.000012 RET   socket 5
   432 sendmail 0.000014 CALL  connect(0x5,0x80ab308,0x10)
   432 sendmail 0.000022 RET   connect 0
   432 sendmail 0.000014 CALL  sendto(0x5,0xbfbfd7cc,0x2a,0,0,0)
   432 sendmail 0.000032 GIO   fd 5 wrote 42 bytes

"\M-r\M-_\^A\0\0\^A\0\0\0\0\0\0\bthe-rock\^Elausd\^Ck12\^Bca\^Bus\0\0\
        \^\\0\^A"
   432 sendmail 0.000012 RET   sendto 42/0x2a
   432 sendmail 0.000014 CALL
kevent(0x3,0xbfbfd58c,0x1,0xbfbfd58c,0x1,0xbfbfd5
78)
   432 sendmail 5.006796 RET   kevent 0
   432 sendmail 0.000038 CALL  close(0x5)
   432 sendmail 0.000022 RET   close 0
   432 sendmail 0.000010 CALL  socket(0x2,0x2,0)
   432 sendmail 0.000013 RET   socket 5
   432 sendmail 0.000008 CALL  connect(0x5,0x80ab308,0x10)
   432 sendmail 0.000015 RET   connect 0
   432 sendmail 0.000009 CALL  sendto(0x5,0xbfbfd7cc,0x2a,0,0,0)
   432 sendmail 0.000021 GIO   fd 5 wrote 42 bytes

"\M-r\M-_\^A\0\0\^A\0\0\0\0\0\0\bthe-rock\^Elausd\^Ck12\^Bca\^Bus\0\0\
:        \^\\0\^A"
   432 sendmail 0.000013 RET   sendto 42/0x2a
   432 sendmail 0.000007 CALL
kevent(0x3,0xbfbfd58c,0x1,0xbfbfd58c,0x1,0xbfbfd5
78)
   432 sendmail 10.009035 RET   kevent 0
   432 sendmail 0.000023 CALL  close(0x5)
   432 sendmail 0.000017 RET   close 0
   432 sendmail 0.000009 CALL  socket(0x2,0x2,0)
   432 sendmail 0.000013 RET   socket 5
   432 sendmail 0.000008 CALL  connect(0x5,0x80ab308,0x10)
   432 sendmail 0.000016 RET   connect 0
   432 sendmail 0.000009 CALL  sendto(0x5,0xbfbfd7cc,0x2a,0,0,0)
   432 sendmail 0.000018 GIO   fd 5 wrote 42 bytes

"\M-r\M-_\^A\0\0\^A\0\0\0\0\0\0\bthe-rock\^Elausd\^Ck12\^Bca\^Bus\0\0\
        \^\\0\^A"
   432 sendmail 0.000012 RET   sendto 42/0x2a
   432 sendmail 0.000007 CALL
kevent(0x3,0xbfbfd58c,0x1,0xbfbfd58c,0x1,0xbfbfd5
78)
   432 sendmail 15.564967 RET   kevent 1
   432 sendmail 0.000027 CALL
recvfrom(0x5,0xbfbfe098,0x400,0,0xbfbfd5a0,0xbfbf
d574)
   432 sendmail 0.000015 GIO   fd 5 read 42 bytes

"\M-r\M-_\M^A\M^B\0\^A\0\0\0\0\0\0\bthe-rock\^Elausd\^Ck12\^Bca\^Bus\0\
:        \0\^\\0\^A"
   432 sendmail 0.000012 RET   recvfrom 42/0x2a
   432 sendmail 0.000102 CALL  close(0x5)
   432 sendmail 0.000020 RET   close 0
   432 sendmail 0.000010 CALL  close(0x3)
   432 sendmail 0.000015 RET   close 0

Unfortunately, I'm not too familiar with the sendmail source, so my short
perusal of the code didn't reveal anything to me.  Anyone have any
suggestions on what's going on here and how to fix it?

--
Michael D. Allen
mallen@erhs.la




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020216020603.P1045-100000>