Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On one of our debian squeeze servers, we use a setup of postfix + amavis + dovecot as mailserver. Spamassassin is part of amavis.

Once a day, the process "sa-learn" is started. It is part of spamassassin, training the bayesian filter for it. A good thing, but unfortunately, it exhausts the servers ressources dramatically - the load goes up from 0.5 to 12, the server becomes unresponsive. I have to kill the sa-learn process.

What can I do about it? Is there any chance to make sa-learn behave nice? If there isn't, where can I disable sa-learn? (I did not find any cron start script - the only reference to sa-learn I found is in /usr/sbin/amavisd-new-cronjob, which I commented out with no effect.

share|improve this question

2 Answers 2

I don't think you'd want to disable sa-learn. I'd go this way:

  • Find out how sa-learn gets called (crontab -l, grep -r -i sa-learn /etc/*)
  • Start sa-learn with nice and monitor the load
share|improve this answer
    
Thank you. But I could not find any reference to sa-learn anywhere in /etc/, unfortunately. The only reference I could grep was in /usr/sbin/amavisd-new-cronjob, commenting out did not disable sa-learn. –  Steffen Müller Mar 10 '11 at 14:01
    
Look in /etc/cron.daily. It may be called from an sa-update script –  Alex Mar 25 '11 at 17:45

I had a similar issue with response time, until I found out that the SpamAssassin database requires some minimal ongoing maintenance. Are you issuing

sa-learn --force-expire

on a daily basis? It could be that a lack of maintenance has made the database unweildy and it needs to be "trimmed up a bit". Try placing it in a daily cron job and see if the response is better on the next sa-learn run.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.