You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Ma...@hbinc.com on 2004/09/23 18:30:49 UTC

spamc/spamd for MIMEDefang

There's some debate on the MIMEDefang list on a performance issue and I wanted to get the SpamAssassin users' take on this.

Is there any potential performance benefit to have MIMEDefang call out to spamd using spamc?

Suppose I'm running MIMEDefang and SpamAssassin on a relay server.  I might also be running, for example, clamav-milter.

As MIMEDefang and SpamAssassin are both Perl, MIMEDefang can just do a
use Mail::SpamAssassin;
and then be able to create spamassassin objects natively.

MIMEDefang runs in a multiplexor mode, where multiple slave process are created more or less as needed.

SpamAssassin (obviously) can also run in a daemon-style mode as spamd, where multiple slave processes are created more or less as needed.

So the question becomes - should each MIMEDefang process create its own Mail::SpamAssassin object, or should it reach out using spamc to the pool of spamd processes?

I am firmly of the opinion that it should reach out using spamc, and here's why.

SpamAssassin is the single most resource-intensive thing that MIMEDefang does!

Allow me to create a stupid analogy.

Suppose you're a general in the land-based armed force of your choosing.  You have a fixed budget (RAM/disk space/IO throughput/bandwidth), and you have been tasked with clearing a certain fixed area of enemy soldiers in a certain time (or "as soon as possible.")

You can requisition infantry (MIMEDefang) and tanks (SpamAssassin.)  The infantry are faster and cheaper.  The tanks are much more powerful but are also slower and more expensive.

My strategy in such a situation would be to requisition a large number of infantry (say 50) and a small number of tanks (say 4)  I'd give everybody a phone.  The infantry could cover the area, and if they needed help they could call the nearest tank.

The infantry commanders are going to suggest that maybe I have a tank follow each unit around, and that would save time and energy.  They wouldn't need to call the tank and wait for it to show up.

My response as the general would be: if we were to limit ourselves to one-infantry-unit-per-tank we could only go as high as eight infantry and eight tanks due to budgetary constraints (RAM limit.)  That wouldn't be able to cover the area in time.

Matthew.van.Eerde@hbinc.com                      805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"