[Mimedefang] CPU load problem
hege at hege.li
Tue Oct 14 05:08:32 EDT 2008
On Tue, Oct 14, 2008 at 10:36:33AM +0200, Steffen Kaiser wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Tue, 14 Oct 2008, Henrik K wrote:
>> And it is impossible to use BerkeleyDB for such load, due to locking issues.
>> You need to switch to a real database like MySQL.
> I switched to Postgres for this very reason, but still have "deadlock"
> warnings in the logs. The Bayes implementation seems to be quite tricky.
I have no idea about Postgres, but MySQL works fine here for 2.3 million
tokens. Table size is 265MB. Make sure you have buffer/cache set big enough
to hold the whole table. Also remove any unnecessary indexes, you only
really need to index the token. Don't index atime if you have everything in
memory and do expiry once every night.
You can get good timing information with SpamAssassin 3.3+ (cvs). My
check_bayes takes normally 50-300ms and learning another same. I have a
lousy 2x1Ghz server.
Remember to move AWL to SQL also.
More information about the MIMEDefang