You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mike Grice <mg...@plus.net> on 2005/04/25 12:58:00 UTC

Rule of thumb for max children?

Hi there,

I'm running SA 3.0.2 via spamc/spamd on an Exim mail server, but I'm
finding I quickly run out of memory and the machine collapses into a
burning heap as soon as it touches swap.  

Is there a rule of thumb of how many SA daemons to prefork to the amount
of RAM?  The boxes currently have 2G and I'm having to restart
spamassassin every hour -- and theyre still running out just before it
hits the hour in some cases.  The daemons are really chewing through the
RAM:

root     28020  0.0  1.4 36148 30408 ?       Ss   11:32
0:01 /usr/sbin/spamd --create-prefs --max-children 15 --helper-home-dir
--socketpath=/tmp/spamd -d --pidfile=/var/run/spamd.pid
root     28021  5.6  1.9 56724 40776 ?       S    11:32   1:18 spamd
child
Debian-  28022  6.5  6.8 156404 142448 ?     S    11:32   1:30 spamd
child
Debian-  28023  7.0  6.8 156112 141248 ?     S    11:32   1:37 spamd
child
root     28024  9.5  7.0 157928 145628 ?     S    11:32   2:11 spamd
child
root     28025  8.9  6.9 154064 143532 ?     S    11:32   2:03 spamd
child
root     28026  7.4  6.8 152392 141392 ?     S    11:32   1:43 spamd
child
root     28027  8.5  6.9 155744 142780 ?     S    11:32   1:57 spamd
child
root     28028  6.4  6.7 154576 140532 ?     S    11:32   1:29 spamd
child
Debian-  28029  8.7  6.9 158684 144576 ?     S    11:32   2:00 spamd
child
Debian-  28030  8.5  6.8 154096 141724 ?     S    11:32   1:57 spamd
child
root     28031  5.5  1.9 55348 40048 ?       S    11:32   1:17 spamd
child
root     28032  7.9  6.9 156164 143112 ?     S    11:32   1:49 spamd
child
root     28033  9.6  6.9 155404 143244 ?     S    11:32   2:13 spamd
child
root     28034  7.6  6.9 156244 143224 ?     S    11:32   1:45 spamd
child
root     28035  9.0  6.8 154256 142284 ?     S    11:32   2:05 spamd
child

The machines are dual xeon 2.4G with 2G of RAM and dual U320 SCSI drives
in software RAID1.  I could feasibly bump the boxes up to 4G, but it
will get expensive!

Any suggestions would be appreciated!

Cheers
Mike

-- 
Sticking feathers up your butt does not make you a chicken.



Re: Rule of thumb for max children?

Posted by jdow <jd...@earthlink.net>.
From: "Mike Grice" <mg...@plus.net>

> On Mon, 2005-04-25 at 11:58 +0100, Mike Grice wrote:
> > Hi there,
> >
> > I'm running SA 3.0.2 via spamc/spamd on an Exim mail server, but I'm
> > finding I quickly run out of memory and the machine collapses into a
> > burning heap as soon as it touches swap.
> >
> > Is there a rule of thumb of how many SA daemons to prefork to the amount
> > of RAM?  The boxes currently have 2G and I'm having to restart
> > spamassassin every hour -- and theyre still running out just before it
> > hits the hour in some cases.  The daemons are really chewing through the
> > RAM:
>
> Just to answer my own question (I'm not going mad, honest), I just
> noticed the max-connections-per-child by default is 200.  I guess that
> this could be nasty for memory usage, so I've tried dropping it to 100.
> Is there a FAQ for high-volume installations?
>
> I'll post my findings on the above...

On a hunch try fewer prespawns (to keep them from robbing each other
of processor time needlessly since IO accounts for a very small part
of a typical spamd run) and try far fewer connections per child say
15 or 20. Then start tuning for your particular load.

Of course, I've been known to be all wet before. This is particularly
common with me in an insomniac state as I am now.

{^_-}



Re: Rule of thumb for max children?

Posted by Mike Grice <mg...@plus.net>.
On Mon, 2005-04-25 at 11:58 +0100, Mike Grice wrote:
> Hi there,
> 
> I'm running SA 3.0.2 via spamc/spamd on an Exim mail server, but I'm
> finding I quickly run out of memory and the machine collapses into a
> burning heap as soon as it touches swap.  
> 
> Is there a rule of thumb of how many SA daemons to prefork to the amount
> of RAM?  The boxes currently have 2G and I'm having to restart
> spamassassin every hour -- and theyre still running out just before it
> hits the hour in some cases.  The daemons are really chewing through the
> RAM:

Just to answer my own question (I'm not going mad, honest), I just
noticed the max-connections-per-child by default is 200.  I guess that
this could be nasty for memory usage, so I've tried dropping it to 100.
Is there a FAQ for high-volume installations?

I'll post my findings on the above...

Cheers
Mike
-- 
Sticking feathers up your butt does not make you a chicken.



Re: Rule of thumb for max children?

Posted by Eugene Kurmanin <ku...@mtmail.ru>.
Hello, Mike.

Do you limit the maximum size of messages to be scanned?
For reduce receiving of 100% spam messages use the Exim sender
verification; then if you are
use exiscan and it can, do reject messages from zombie computers with
bogus HELO, like HELO 123.123.123.123 or HELO
123-123-123.virtua.com.br... and using delay SMTP greeting very useful also.

You wrote 25 апреля 2005 г., 14:58:00:

> Hi there,

> I'm running SA 3.0.2 via spamc/spamd on an Exim mail server, but I'm
> finding I quickly run out of memory and the machine collapses into a
> burning heap as soon as it touches swap.  

> Is there a rule of thumb of how many SA daemons to prefork to the amount
> of RAM?  The boxes currently have 2G and I'm having to restart
> spamassassin every hour -- and theyre still running out just before it
> hits the hour in some cases.  The daemons are really chewing through the
> RAM:

> root     28020  0.0  1.4 36148 30408 ?       Ss   11:32
> 0:01 /usr/sbin/spamd --create-prefs --max-children 15 --helper-home-dir
> --socketpath=/tmp/spamd -d --pidfile=/var/run/spamd.pid
> root     28021  5.6  1.9 56724 40776 ?       S    11:32   1:18 spamd
> child
> Debian-  28022  6.5  6.8 156404 142448 ?     S    11:32   1:30 spamd
> child
> Debian-  28023  7.0  6.8 156112 141248 ?     S    11:32   1:37 spamd
> child
> root     28024  9.5  7.0 157928 145628 ?     S    11:32   2:11 spamd
> child
> root     28025  8.9  6.9 154064 143532 ?     S    11:32   2:03 spamd
> child
> root     28026  7.4  6.8 152392 141392 ?     S    11:32   1:43 spamd
> child
> root     28027  8.5  6.9 155744 142780 ?     S    11:32   1:57 spamd
> child
> root     28028  6.4  6.7 154576 140532 ?     S    11:32   1:29 spamd
> child
> Debian-  28029  8.7  6.9 158684 144576 ?     S    11:32   2:00 spamd
> child
> Debian-  28030  8.5  6.8 154096 141724 ?     S    11:32   1:57 spamd
> child
> root     28031  5.5  1.9 55348 40048 ?       S    11:32   1:17 spamd
> child
> root     28032  7.9  6.9 156164 143112 ?     S    11:32   1:49 spamd
> child
> root     28033  9.6  6.9 155404 143244 ?     S    11:32   2:13 spamd
> child
> root     28034  7.6  6.9 156244 143224 ?     S    11:32   1:45 spamd
> child
> root     28035  9.0  6.8 154256 142284 ?     S    11:32   2:05 spamd
> child

> The machines are dual xeon 2.4G with 2G of RAM and dual U320 SCSI drives
> in software RAID1.  I could feasibly bump the boxes up to 4G, but it
> will get expensive!

> Any suggestions would be appreciated!

> Cheers
> Mike




-- 
Kind regards,
Eugene Kurmanin