Archive for October, 2008

Some things I did to improve performance in my Postfix+amavisd-new setup

October 19th, 2008 by tripledes

Sabayon Linux
I was having some performance problems with my Postfix+amavisd-new setup, it was sending just about 25 mails per minute. As it’s used to send (among other things) commercial campaigns via email it was not enough so I had to research a little about how to improve the service performance without having to take off the spam and virus checks.

What did I find out?

- Increase the number of postfix and amavisd-new processes, but ClamAV was a bottleneck.
- Improve sender checks on postfix to reject mail before it even gets into the system.
- Choose good RBLs (i.e. spamcop).
- Decrease the time a mail can be hold in the deferred queue.
- Increase the interval time to recheck the deferred queue.
- Mount the amavisd-new scanning folder in tmpfs.
- Setup local DNS.
- Setup local DNS cache (nscd) and configure nsswitch.conf to use it.

All these boost the service up from 25 to 100 mails per minute but still wasn’t enough so I finally decided to define in amavisd.conf the IP addresses from very trusted clients. This was the real killer…the service went from 100 to 400 per minute. Now everyone is happy and I haven’t completly disabled amavisd-new :) .

Tags: ,