You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris <cp...@earthlink.net> on 2006/01/12 01:35:12 UTC

Optimum home system setup

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I run SA 3.1 on a home system which gets about 200 - 250 msgs a day, the 
majority being spam of course.  I have 768mb of ram with a swap of 612mb, 
an AMD Sempron 1.6GHz processor.  This is how spamd is started from 
the /etc/rc.d/init.d/spamassassin script:

OPTIONS="-d -c -H -m 2 --max-conn-per-child=100 --min-children=2"

Does this look like an optimum setting or can it be tweaked better?

- -- 
Chris
Registered Linux User 283774 http://counter.li.org
18:28:00 up 2 days, 14 min, 1 user, load average: 0.04, 0.11, 0.08
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDxaRA43Kn2pjmcFwRAqRkAKCDRrz72jXj/GPRA4x+A+jHTWc94gCfYvjw
6rEOPfqDXkvRW+NONVXkN+M=
=0gfc
-----END PGP SIGNATURE-----

Re: Optimum home system setup

Posted by Nix <ni...@esperi.org.uk>.
On Wed, 11 Jan 2006, jdow@earthlink.net stipulated:
> From: "Chris" <cp...@earthlink.net>
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> I run SA 3.1 on a home system which gets about 200 - 250 msgs a day, the majority being spam of course.  I have 768mb of ram with
>> a swap of 612mb, an AMD Sempron 1.6GHz processor.  This is how spamd is started from the /etc/rc.d/init.d/spamassassin script:
>> OPTIONS="-d -c -H -m 2 --max-conn-per-child=100 --min-children=2"
>> Does this look like an optimum setting or can it be tweaked better?
> 
> For 3.0x this is not right. But 3.1 may have added --min-children.
> I'd use --max-children=2 anyway. You absolutely positively do not
> want to run into swapping. If you have anything else running, like
> an X session, you're toast with more than a couple children. Besides,

He's got *768Mb of RAM*. You can run five children and be doing other
things with no danger of swapping on a box with that much RAM. (I
have one with 512Mb running five children and X and much else with
no difficulty at all.)

> for 200 - 250 messages a day you probably don't really need more than
> one child floating around at any given time.

The relevant factor here is the *burstiness*. If the mails arrive in
bursts (as they often do on home systems, fetchmailing down from a POP3
server somewhere), then you'll want enough --max-children to cope with
the largest burst of simultaneously-arriving emails you're likely to
encounter, except if that many children would cause swapping. The extra
children will die as soon as their job is done in any case, so you can
forget about the --max-conn-per-child in most cases too.

The --min-children is almost certainly a waste of effort: let spamd
kill children that aren't doing anything. It takes almost no time to
kick off new children anyway.

-- 
`Logic and human nature don't seem to mix very well,
 unfortunately.' --- Velvet Wood

Re: Optimum home system setup

Posted by Chris <cp...@earthlink.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 11 January 2006 9:10 pm, jdow wrote:
> On 2.64 I'm not sure what's the forking process. It may be modestly
> painful. But an extra 3 seconds every hour and a half is no big tax
> to pay on your machine's performance unless you're trying to play
> precision timing games in the background. Heck, you could run raw
> spamassassin and not really see any performance loss on your machine
> at a puny one message every 6 minutes, I think you said as your rough
> message level. The only machine on which I've had problems with the
> 1500 messages a day traffic level is the 66 MHz Pentium with 256 M
> of memory that was pretty much swamped. It took 20 seconds to 30 seconds
> to process a message.
>
> I believe prefork simply means that spamd used up its child, which lives
> for one message worth of processing, and that it is creating a new child
> ahead of time so it is ready for the next message.
>
> {^_^}

Thanks Joanne, with that said, I'll leave things as they are for now. 
Appreciate the replies.

- -- 
Chris
Registered Linux User 283774 http://counter.li.org
21:25:30 up 2 days, 3:11, 1 user, load average: 0.12, 0.30, 0.44
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDxcxb43Kn2pjmcFwRAhGPAJ4r7IFFX81ADBOyHKGKKrZ+5V4DhQCeKGoh
DI76pmqDcc6y4o0yR1fuzno=
=J6T7
-----END PGP SIGNATURE-----

Re: Optimum home system setup

Posted by jdow <jd...@earthlink.net>.
On 2.64 I'm not sure what's the forking process. It may be modestly
painful. But an extra 3 seconds every hour and a half is no big tax
to pay on your machine's performance unless you're trying to play
precision timing games in the background. Heck, you could run raw
spamassassin and not really see any performance loss on your machine
at a puny one message every 6 minutes, I think you said as your rough
message level. The only machine on which I've had problems with the
1500 messages a day traffic level is the 66 MHz Pentium with 256 M
of memory that was pretty much swamped. It took 20 seconds to 30 seconds
to process a message.

I believe prefork simply means that spamd used up its child, which lives
for one message worth of processing, and that it is creating a new child
ahead of time so it is ready for the next message.

{^_^}
----- Original Message ----- 
From: "Chris" <cp...@earthlink.net>

Thanks Joanne, what has me wondering about the setup is that in GKrellm it 
will show 257mb of ram free and 537mb of swap free, I do a service 
spamassassin restart and free ram jumps up to 350mb and free swap jumps to 
595.  I used to have a cron job I ran that daily would restart SA, that was 
I think with 2.63 or 2.64.  I also notice that sometimes once an hour and 
sometimes 5 or 6  times an hour my syslog shows:

spamd[1061]: prefork: child states: II 

I may have not read the correct manpage but I can't find an explanation for 
prefork.  Is it respawning the child processes at that time?



Re: Optimum home system setup

Posted by Chris <cp...@earthlink.net>.
On Wednesday 11 January 2006 7:06 pm, jdow wrote:
> From: "Chris" <cp...@earthlink.net>
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I run SA 3.1 on a home system which gets about 200 - 250 msgs a day,
> > the majority being spam of course.  I have 768mb of ram with a swap of
> > 612mb, an AMD Sempron 1.6GHz processor.  This is how spamd is started
> > from the /etc/rc.d/init.d/spamassassin script:
> >
> > OPTIONS="-d -c -H -m 2 --max-conn-per-child=100 --min-children=2"
> >
> > Does this look like an optimum setting or can it be tweaked better?
>
> For 3.0x this is not right. But 3.1 may have added --min-children.
> I'd use --max-children=2 anyway. You absolutely positively do not
> want to run into swapping. If you have anything else running, like
> an X session, you're toast with more than a couple children. Besides,
> for 200 - 250 messages a day you probably don't really need more than
> one child floating around at any given time. Also the affect on your
> machine of a --max-conn-per-child of say 15 or so is rather minimal.
> That's what I use here for 1000 to 1500 emails a day here.
>
> "-d -c -m3 -Hi -A 192.168.X.,127. --max-conn-per-child=15"

I have --max-children set to two, but I'm wondering if 
max-conn-per-child=100 is too many?  The way I read the manpage is that 
after x number of connections on that particular child process it will be 
respawned.  Or am I lost here?  I see it as the lower the number the more 
often a child will die and be respawned.

> The -A restricts the addresses from which spamd will accept connections.
> It's probably not needed. But it adds a little depth to the system's
> security. Machines on the other 192.168.Y. subnets are blocked.
>
Thanks Joanne, what has me wondering about the setup is that in GKrellm it 
will show 257mb of ram free and 537mb of swap free, I do a service 
spamassassin restart and free ram jumps up to 350mb and free swap jumps to 
595.  I used to have a cron job I ran that daily would restart SA, that was 
I think with 2.63 or 2.64.  I also notice that sometimes once an hour and 
sometimes 5 or 6  times an hour my syslog shows:

spamd[1061]: prefork: child states: II 

I may have not read the correct manpage but I can't find an explanation for 
prefork.  Is it respawning the child processes at that time?

-- 
Chris
Registered Linux User 283774 http://counter.li.org
20:15:02 up 2 days, 2:01, 1 user, load average: 0.44, 0.30, 0.16
Mandriva Linux 10.1 Official, kernel 2.6.8.1-12mdk


Re: Optimum home system setup

Posted by jdow <jd...@earthlink.net>.
From: "Chris" <cp...@earthlink.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I run SA 3.1 on a home system which gets about 200 - 250 msgs a day, the 
> majority being spam of course.  I have 768mb of ram with a swap of 612mb, 
> an AMD Sempron 1.6GHz processor.  This is how spamd is started from 
> the /etc/rc.d/init.d/spamassassin script:
> 
> OPTIONS="-d -c -H -m 2 --max-conn-per-child=100 --min-children=2"
> 
> Does this look like an optimum setting or can it be tweaked better?

For 3.0x this is not right. But 3.1 may have added --min-children.
I'd use --max-children=2 anyway. You absolutely positively do not
want to run into swapping. If you have anything else running, like
an X session, you're toast with more than a couple children. Besides,
for 200 - 250 messages a day you probably don't really need more than
one child floating around at any given time. Also the affect on your
machine of a --max-conn-per-child of say 15 or so is rather minimal.
That's what I use here for 1000 to 1500 emails a day here.

"-d -c -m3 -Hi -A 192.168.X.,127. --max-conn-per-child=15"

The -A restricts the addresses from which spamd will accept connections.
It's probably not needed. But it adds a little depth to the system's
security. Machines on the other 192.168.Y. subnets are blocked.

{^_^}