dccm failure under load

Vernon Schryver vjs@calcite.rhyolite.com
Sun Jan 5 06:24:21 UTC 2003


> From: Gary Mills <mills@cc.UManitoba.CA>

> ...
> I notice just now that `dccm' has 153 threads.  It was higher a few
> minutes ago, so it must be managing them.  For comparison, our Trend
> virus scanner milter has 62 threads.  It too was higher a few minutes
> ago, about double.  When I look at `dccm' with `lsof', it has used
> 598 file descriptors.  Some are TCP connections to sendmail.  Some
> are for log files.  However the vast majority are for UDP sockets.

> ...
> What are all these used for?  Are they for queries to the DCC server?
> Why are there so many of them?  According to `netstat -an', they are
> connected to port 6277 on the DCC server host. ...

Each active dccm thread is likely to have one UDP socket for talking
to the (or a) DCC server.  

When sendmail starts talking to an SMTP clients, it creates TCP
connections to all milter filters.  Each milter filter creates
a thread and calls the initial hook of the filter.  The initial
milter hook for dccm involves finding a free "context" or creating one.
Each dccm context contains various data including growing checksums
and eventually a file descriptor for a UDP socket to talk to a DCC server.
For speed, the UDP socket is not closed when the dccm thread is finished
and the dccm "context" is released.

153 dccm threads will involve somewhat more than 459 file descritors.
Each thread will have a TCP UNIX-domain connection to sendmail, a UDP
socket for talking to the DCC server, and a log file.  If per-user
log files are used, there will be a transient fourth file descriptor
per thread.  There are few dozen file descriptors for the global white-list
and per-user white-lists.  The client DCC map will involve another
file descriptor.  There are likely to be open file descriptors hidden
libc routines such the DNS resolver code.  Solaris seems to involve
about two dozen file descritors for shared libraries.  So overall,
598 file descriptors sounds about right for somewhat fewer than 200
dccm threads without per-user whitelists or per-user log files.


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.