On 2011-11-17 07:15, Alex wrote:
Hi,

I built a dual-Xeon quad-core box with 8GB using fedora15 and
postfix-v2.8.5 and during various times during the day connections to
port 25 timeout or are very slow. The majority of times this happens
is under peak loads, but even times when it's not at capacity it may
do this.
Often slow smtpd connections are caused by not having enough smtpd
processes running.

On your hardware, postfix will support thousands of smtpd processes.
  Use netstat or lsof to see how many connections postfix is handling
when you experience slowdowns.
It's in the hundreds. There is also some amount of iowait, but I don't
think that's the issue.

When using amavisd-new, shouldn't the number of processes match the
number of smtpd processes?

Hell no, amavisd can kill your system dead.
It will take 100MB per process easily, and each of these takes much more time to complete than any comparable SMTP transaction - or postfix queue process. If you are using more than about 50 amavisd threads, you'll be depleting those 8GB very quickly.

As said previously, postscreen to stop the 90% spam connections, a few hundred smtpds, and 50 or so amavisd threads should be doable.

Mail will be queued before amavis can get to it, but that is the nature of the beast - 8GB is very little memory for a modern server system.

Max out the board to 32 or 48GB, whatever it takes - it will cost far less than any other solution.


--
J.

Reply via email to