[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: load average: 5,60 at 5 smtpprocesses !?
Bartek Krajnik <bartek@indigo.pl> writes:
> top - 17:25:36 up 29 days, 3:08, 2 users, load average: 5.51, 5.60,
> 5.66
> Tasks: 439 total, 8 running, 431 sleeping, 0 stopped, 0 zombie
> Cpu(s): 46.4% user, 53.6% system, 0.0% nice, 0.0% idle
> Mem: 904228k total, 877744k used, 26484k free, 50956k buffers
> Swap: 1959848k total, 171252k used, 1788596k free, 618944k cached
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ Command
> 26742 root 18 0 896 864 788 R 37.3 0.1 52:05.64
> smtpserver
> 26741 root 20 0 896 864 788 R 36.6 0.1 52:41.82
> smtpserver
> 26744 root 17 0 896 864 788 R 35.0 0.1 51:23.73
> smtpserver
> 26745 root 18 0 896 864 788 R 34.6 0.1 50:41.39
> smtpserver
> 26743 root 17 0 896 864 788 R 33.7 0.1 50:04.37
> smtpserver
>
> Why smtpserver need so many processor cycles?
Could be the bug I saw here - if you're hitting the maximum number of
connects from a single host it attempts to use the output buffer to
send the failure message, but the memory for it hasn't been allocated,
so it ends up spinning. This seemed to fix it for me:
Index: smtpserver/smtpserver.c
===================================================================
RCS file: /upstream-repositories/anoncvs.zmailer.org/zmailer/smtpserver/smtpserver.c,v
retrieving revision 1.147
diff -u -r1.147 smtpserver.c
--- smtpserver/smtpserver.c 2003/06/09 13:18:22 1.147
+++ smtpserver/smtpserver.c 2003/08/14 15:57:59
@@ -1928,6 +1928,11 @@
SS->s_bufread = -1;
SS->s_ungetcbuf = -1;
SS->s_readout = 0;
+ /* Actually all modes use this write-out buffer */
+ SS->sslwrbuf = emalloc(8192);
+ SS->sslwrspace = 8192;
+ SS->sslwrin = SS->sslwrout = 0;
+
fd_nonblockingmode(infd);
fd_nonblockingmode(outfd);
@@ -2081,11 +2086,6 @@
#endif /* - HAVE_OPENSSL */
}
}
-
- /* Actually all modes use this write-out buffer */
- SS->sslwrbuf = emalloc(8192);
- SS->sslwrspace = 8192;
- SS->sslwrin = SS->sslwrout = 0;
#ifdef HAVE_OPENSSL
if (ssmtp_connected) {
--
Alex Kiernan, Principal Engineer, Development, THUS plc
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi