Bug 6843 - Possible Spamd option bug
Summary: Possible Spamd option bug
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamc/spamd (show other bugs)
Version: 3.3.2
Hardware: PC Windows 7
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-26 15:19 UTC by Kevin A. McGrail
Modified: 2012-10-23 09:51 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin A. McGrail 2012-09-26 15:19:59 UTC
I noticed that I had a LOT of spare servers on a server that I was testing.

On fresh restarts with zero connections:


Firs, I would have expected 2 children to spawn, not 10 which is the max-spare...

root     20333  7.2  1.0  45920 43060 ?        Ss   11:14   0:08 /usr/local/bin/spamd -d --min-spare=1 --min-children=2 --max-spare=10 --max-conn-per-child=1000 --max-children=20 -q -x -u spamd
spamd    20411  0.0  1.0  45848 43060 ?        S    11:15   0:00 spamd child
spamd    20412  0.0  1.0  45856 43060 ?        S    11:15   0:00 spamd child
spamd    20413  0.0  1.0  45864 43060 ?        S    11:15   0:00 spamd child
spamd    20414  0.0  1.0  45872 43060 ?        S    11:15   0:00 spamd child
spamd    20415  0.0  1.0  45880 43060 ?        S    11:15   0:00 spamd child
spamd    20416  0.0  1.0  45888 43060 ?        S    11:15   0:00 spamd child
spamd    20417  0.0  1.0  45896 43060 ?        S    11:15   0:00 spamd child
spamd    20418  0.0  1.0  45904 43060 ?        S    11:15   0:00 spamd child
spamd    20419  0.0  1.0  45912 43060 ?        S    11:15   0:00 spamd child
spamd    20420  0.0  1.0  45920 43060 ?        S    11:15   0:00 spamd child


Second, adjusting only max-spare, I got less children spawned...

root     20731 46.5  1.0  46032 43252 ?        Ss   11:17   0:09 /usr/local/bin/spamd -d --min-spare=1 --min-children=2 --max-spare=2 --max-conn-per-child=1000 --max-children=20 -q -x -u spamd
spamd    20741  0.2  1.0  46024 43252 ?        S    11:17   0:00 spamd child
spamd    20742  0.2  1.0  46032 43252 ?        S    11:17   0:00 spamd child
Comment 1 RW 2012-09-26 21:17:36 UTC
That's correct behaviour. The number of children is initialised at the greater of  of min-children and max-spare. The number of children can't be reduced unless the count is above max-spare so starting at at a lower figure would put it in a state that's not representative of normal operation.

Personally, I'd prefer it if there were some mechanism to decrement the count down to min-children/min-spare, perhaps on an inactivity timer, because that would be better for SOHO servers.