I'm pretty sure it is that, because when I turn of bayes altogether, the spikes go away.  I also ran sa-learn --force-expire and it PEGS the VM.  With bayes debugging enabled, I see lines like this in my syslog:

bayes: expired old bayes database entries in 236 seconds: 152268 entries kept, 9457 deleted

We have about 140 users, each with a 5 MB bayes_toks file, so there is a need to expire somebody all throughout the day.  Each user is virtual, they don't really have an account on the box, but the directories correspond to each user address.  And we do auto-learn, with opportunistic expiry.

Good thought about --round-robin, I am willing to use a little more memory if it saves on CPU.

"Ring, John C" <[EMAIL PROTECTED]> wrote:
>From: Sammy Anderson [mailto:[EMAIL PROTECTED]
>
>We recently migrated our SpamAssassin installation from a physical 3.6
GHz system
>running RHEL 4 and SA 3.0.4 to a VMware VM (ESX 2.5.4) with RHEL 4 as
the guest OS
>and SA 3.1.7.

I just did the same thing last week, except we're using RHEL 3 and ESX
2.5.2, and the physical box it used to be on was far less powerful then
yours.

>Each user has their own Bayes files (Berkeley DB) and these were copied
from the old to
>the new server. Now whenever an expiry process runs on a user's
database, the CPU
>spikes, sometimes for a minute or longer.

Hmm. We're using ours as a site-wide MTA to be able to reject incoming
mails at SMTP time, so no user DBs on the box, but we are running with
Bayes checking on (Berkeley DB), autolearning off, and manual Bayes
feeding only a few times a day. Because of that, I don't have practice
with a heavy Bayes load, but how certain are you that it's Bayes hitting
the CPU; did you run sa-learn (or spamassassin) with network reporting
turned off to see if that makes a difference?

I ask because pyzor did keep our CPU at a constant 75% until I turned it
off; now it varies from 25% to 75% over the day, which is a lot more
acceptable :)

Another thought, albeit perhaps not directly related, is are you running
spamd with --robin-robin? When I did that, it reduced the CPU load with
the trade-off of using a little more memory, which seems to be the
better trade-off, especially for a VM on ESX.

--
John C. Ring, Jr.
[EMAIL PROTECTED]
Network Engineer
Union Switch & Signal Inc.

"If men were angels, no government would be necessary. If angels were to
govern men, neither external nor internal controls on government would
be necessary." -- James Madison


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.

Reply via email to