Relation between max_servers and ncpu

Henrik K hege at
Fri Feb 24 13:15:16 CET 2012

On Fri, Feb 24, 2012 at 09:33:22AM -0200, Renato Botelho wrote:
> Hello,
> I run a server with postfix + amavisd-new + clamav + spamassassin, this
> server have 8 cores and 16Gb of RAM. We have max_servers=6 set on
> amavisd.conf and it works as expected, but, when a good number of emails
> come at the same time, it takes a long time to process the entire queue.
> I did a simple math average, email are taking about 3s to be processed.
> I'm considering increase max_servers on this environment, but i'm worried
> about if I set it to a number bigger than the number of current CPUs won't
> be a problem for the other services running in this machine.
> Do you have any consideration about that subject? How is the best way to
> define max_servers value?

Look, I have max_servers=20 on an ancient 4x1Ghz SPARC with no problems.

One amavisd process cannot take 100% cpu for all the 3 seconds. Most of that
time is waiting for DNS lookups.

Just put something like 20-30 depending on how you want to prioritize other
services and mail flow.

If you put too many, the worst case scenario is that some processes get
marginally slower (but total throughput will be great).  You need to

More information about the amavis-users mailing list