[Mimedefang] Speeding up MIMEDefang
dave at nofuture.ch
Sun Nov 23 06:39:39 EST 2003
I'm looking for some tricks to speed up MIMEDefang. I have read the
PDF about MIMEDefang where there is written that someone managed a intel
based system to proceed 2 million mails a day. My system (Single CPU P4
2.53Ghz, 1GB RAM, SCSI disks using shmfs... full SA checks enabled.
razor, pyzor, dcc, a total of 18 RBL checks, and 1 antivirus running, no
sql/db lookups) currently is on it's limit at ~50'000 mails a day.
The load is something like:
At night and weekend: 0.1 - 0.2
Business hour: 1.0 - 2.5
Spikes (are happen 2-3 times a day): 5.0-15.0
(sendmail starts refusing connections at la 8 on my system)
a) As I can see spamassassin is using /tmp for temporary Files:
ls -la /tmp/sa.*
-rw------- 1 defang nogroup 1978 Nov 22 17:27 sa.2637.5adpg1
I would like to configure SA to use /var/spool/MIMEDefang/tmp (which is
shmfs). Anyone already fixed this? I don't want to symlink /tmp to
/var/spool/MIMEDefang/tmp cause I really want only MD using this limited
space on the shmfs.
b) There are several external programs used by MD (pyzor, python, dcc,
razor, Antivirus and such) Is there a good way the speed up the access
on these files? Is there a simple (and safe) way to put these files on
/var/spool/MIMEDefang (shmfs) and make MD executing these from there?
Does anonyone know a caching FS kernel or userspace based?
It seems to me that MD is working very well so far enough RAM is free,
but bloody slows down once the FS isn't cached well enough since real
memory somehow went low. If I could make sure that the access to some
of the most important files is always fast as hell I think MD could
work better on high load.
c) What can be done to improve the speed of perl?
I'm thinking of something like perl-cache or speedycgi:
Anyone managed to get MD work with something like that?
d) Net::DNS seems to be a performance problem. Is there a way to move
DNS RBL Checks from Net::DNS to a C-written, multithreaded, daemonized
e) There are some DNS RBL zones which can be downloaded. For example
I have the RBL+ from mail-abuse as BIND db-file on my DNS server. I
Could export this file into berkeley DB format and put this file into
shfm FS and use some File_DB Perl-based funktion to lookup?
Is this a stupid Idea?
Are there any other things I could do to speed up MD?
More information about the MIMEDefang