[Mimedefang] too few slaves *and* too many open files = __FD_SETSIZE woes

Steven Winikoff smw at alcor.concordia.ca
Wed Oct 29 04:27:42 EDT 2008


There must be something obvious that I'm missing, but whatever it is,
I'm missing it.

Basically, we have a number of mail servers running sendmail 8.14.3
plus mimedefang-2.65 and spamassassin-3.2.5.  We currently have
mimedefang configured with a minimum of 40 slaves and a maximum of
128; mimedefang's spool directory is on a RAM disk (it wasn't until
recently, but moving it there hasn't solved the problem).

The problem is that we periodically run out of free slaves.

So why not just up the maximum number of slaves?  We're running on
machines which each have 16 Gb of memory and a quad-core CPU, so
there's plenty of spare hardware capacity...

...but even with only 128 slaves, we're also running into the
per-process file descriptor limit on mimedefang-multiplexor.

So why not just increase the file descriptor limit?

Because this is on Linux, so even if we do increase it beyond the
default value of 1024, we still run into the __FD_SETSIZE limit of
1024 descriptors, and I haven't found a way to increase that.

I *have* found various sources which claim that __FD_SETSIZE can be
modified even if this does violate the interface; for example, see
http://archives.neohapsis.com/archives/postfix/2004-02/2490.html
(changing <bits/types.h> to <bits/typesizes.h> to account for the
vagaries of a newer glibc) -- but I haven't been able to get this
to work.  The resulting mimedefang-multiplexor binary is bit-for-bit
identical to the previous one, and behaves the same way.

I can't believe we're trying to handle that many more messages than
everyone else, and I know we're not even straining the capacity of the
hardware we're using, and we've tweaked every configuration setting we
can find.  Unless there a magic mimedefang configuration setting that we
don't know about, it's beginning to look as though mimedefang just can't
handle our workload because it doesn't use poll() or epoll() instead of
select().  I'd very much like to be wrong about this, but if I am I
truly can't see how.

I've found various archived discussions of the select-vs.-poll question
come up before, including on this list, but I have yet to find an actual
answer.  Mimedefang has worked well for us for six years, but 

     - Steven
________________________________________________________________________
Steven Winikoff                |
Concordia University           | "Artificial Intelligence is the study
Montreal, QC, Canada           |  of how to make real computers act like
smw at alcor.concordia.ca         |  the ones in movies."
http://alcor.concordia.ca/~smw |         - Ralf Brown (in comp.ai, 1992)


More information about the MIMEDefang mailing list