Debian server: “sa-learn” process slows system down dramatically

amavisdebianspamassassin

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.

Best Answer

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.

Related Topic