[Mimedefang] SA/MIMEDefang performance tweaking

Martin Blapp mb at imp.ch
Wed Jun 9 17:59:18 EDT 2004


Hi,

> I've set up my config to use Bayes (along with DCC and Razor2) -- when the
> bayes_toks DB grows to certain size (namely above 100MB), I run into major

The upcoming spamassassin 3.0 does address these problems. There are different
locking mechanisms available (flock(), if you don't access via nfs at all)
which are a lot faster and there are limits for the bayes filter:

I've enabled these settings:

lock_method                             flock
use_bayes                               1
use_bayes_rules                         1
bayes_auto_learn                        1
bayes_journal_max_size                  409600
bayes_expiry_max_db_size                1200000
bayes_auto_expire                       1
bayes_learn_to_journal                  1

Of course you can also run a daily cron job and call sa-learn --force-expire
to clean up the bayes databases.

> Also, would it be wise for me (with my underpowered server) to enable
> queuing for MIMEDefang (in /etc/init.d/mimedefang) and adjust the time-out
> settings (perhaps lowering the time-outs)?  Does restricting the memory size
> of the slave processes pose any problems?  Right now each mimedefang.pl
> slave eats up about 64MB of physical memory (RSS), so it doesn't take long
> for my system to eat up the entire 1GB of RAM -- currently I have not

Use the multiplexer and enable the embedded perl modus. Read the man pages
how to do this. Then only one main instance of mimedefang does run and forkes
off some slaves. Because of the "copy-on-write" side effect, you only spend
1x40MB + some data instead of 12x40MB.

Martin



More information about the MIMEDefang mailing list