----- Daniel T. Staal <[EMAIL PROTECTED]> wrote:
> On Tue, November 28, 2006 10:53 pm, Tom Samplonius said:
> >   How do you choose the best MaxThreads value for a dedicated mail
> server?
> >  Should MaxThreads be each to double the number of cores, or
> something
> > like that?
> >
> >   What happens if MaxThreads is set too high?  Too low?
> 
> The main advice I've seen is that more is generally better, subject to
> the
> amount of RAM on your machine.  Too low and mail will have to either
> wait
> to be checked until a thread is free, or be skipped.  Too high and
> the
> machine will go into swap.  (Which is a massive performance hit.) 
> End
> result is the same for a mail processing system: less mail can go
> through
> your machine.  Too low is generally less of a performance hit than
> too
> high.
> 
> So the numbers of cores/processors seems to be mostly irrelevant. The
> amount of RAM you have available is the relevant number.
> 
> Daniel T. Staal

  I don't know if that is accurate.  clamd seems completely CPU bound.  I also 
don't know why additional threads would use a lot of extra memory, as clamd 
seems to just stream data from the files it is caching.

  And I don't see it in practice either.  clamd with MaxThreads uses about 50MB 
resident, and clamd with MaxThreads of 10 is about 48MB.  The difference is so 
small, that is probably just local thread storage.

  But if MaxThreads is too high, the CPU(s) could spend far too much time task 
switching, and not enough time scanning.  If you set MaxThreads too high for 
your machine, clamd will be very inefficient under heavy load.

Tom
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to