clamav MaxThreads?

Rick Cooper rcooper at
Mon Nov 30 18:39:55 GMT 2009

----Original Message----
From: mailscanner-bounces at
[mailto:mailscanner-bounces at] On Behalf Of Frank
Cusack Sent: Monday, November 30, 2009 1:19 PM To: MailScanner discussion
Subject: RE: clamav MaxThreads?

> On November 30, 2009 1:05:36 PM -0500 Rick Cooper <rcooper at>
> wrote:
>> ----Original Message----
>> From: mailscanner-bounces at
>> [mailto:mailscanner-bounces at] On Behalf Of Frank
>> Cusack Sent: Sunday, November 29, 2009 11:10 PM To: MailScanner
>> discussion Subject: clamav MaxThreads? 
>>> Should the clamav (clamd.conf) MaxThreads number match the number
>>> of children that MailScanner is configured to run?
>>> Sorry if this is documented somewhere.
>> Max threads should be set to a value => the maximum parallel scans you
>> expect to see, if MailScanner is the only process scanning then matching
>> the number of MS children or maybe one more. Bear in mind the real memory
>> used per clamd child process is actually small as the virus data is
>> shared among them so the default should be fine unless you are running
>> more MS children than 10
> So I was planning on running 40 MS children -- not because I have high
> mail volume or anything, but because the documentation suggested 5
> children per CPU and I have 8 cores.  Is that too many for my smallish
> setup (150 mail accounts, typical small medium business email).
> The machine running MS is also doing other stuff so I wouldn't want
> MS to run away with all the CPU.

150 mail accounts is a pretty small load, I think 40 children would be way
(multiples) too high. Think in terms of volume as it relates to mailscanner
batches. I would start at 3 - 5 and see how that works out. If the queue
tends to back up then add another one or two.


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list