SA Bugzilla – Bug 7690
spamd man page: elaborate max min items
Last modified: 2024-03-06 00:57:21 UTC
man spamd says: -m number , --max-children=number This option specifies the maximum number of children to spawn. Spamd will spawn that number of children, then sleep in the background until a child dies, wherein it will go and spawn a new child. OK, but setting this to 1 will cause logs to have Thu Jan 24 22:42:55 2019 [18861] info: prefork: server reached --max-children setting, consider raising it with no way to turn off the message. What if the user always processes his spam one by one serially, not in parallel? So please give him a way to disable this particular warning. Also mention this is affected by --max-spare! Else people will wonder why the default (5) is never reached for them. OK, mention maybe setting --max-spare=1 is the right way us serial users should do this. --min-children=number The minimum number of children that will be kept running. The minimum value is 1, the default value is 1. If you have lots of free RAM, you may want to increase this. OK but mention what happens if this is set higher than --max-children. --min-spare=number The lower limit for the number of spare children allowed to run. A spare, or idle, child is one that is not handling a scan request. If there are too few spare children available, a new server will be started every second or so. The default value is 1. Also mention what happens if this is set higher than --max-children. Also mention what setting this to 0 will do. --max-spare=number The upper limit for the number of spare children allowed to run. If there are too many spare children, one will be killed every second or so until the number of idle children is in the desired range. The default value is 2. Also mention what setting this to 0 will do. Will spamd cease to have any functionality? --max-conn-per-child=number This option specifies the maximum number of connections each child should process before dying and letting the master spamd process spawn a new child. The minimum value is 1, the default value is 200. Mention why this is needed. Do more used children get their memory bloated etc.? OK, on some shared servers, the hosting company may have a rule: no persistent processes allowed. So another setting missing seems to be: how long should spamd(s) live waiting around with no messages coming in to be processed? Currently the user must make his scripts kill it after sending the last message to it. As far as an absolute time of life no matter what, mention one can use "timeout 600 spamd" etc. See timeout(1) man page. But that seems a rather violent way to kill it, perhaps when it was in the middle of processing a message.
(In reply to jidanni from comment #0) > man spamd says: > > -m number , --max-children=number > This option specifies the maximum number of children to spawn. > Spamd will spawn that number of children, then sleep in the > background until a child dies, wherein it will go and spawn a new > child. That's misleading as it's only correct for the legacy round-robin pre-fork mode, otherwise it's just a limit. > OK, but setting this to 1 will cause logs to have > > Thu Jan 24 22:42:55 2019 [18861] info: prefork: server reached > --max-children setting, consider raising it > > with no way to turn off the message. What if the user always processes > his spam one by one serially, not in parallel? So please give him a way > to disable this particular warning. In my experience you don't get this if you run one spamc instance at a time - you may need to reconfigure your glue. spamd isn't the right place to throttle a queue. As far as the rest is concerned, the settings are fairly self-explanatory. If anyone wants to know what happens with weird settings they can try them or read the perl. The documentation is already TL;DR for many people. The one exception to this is that fact that the number of children wont drop below max-spare. IMO the behaviour should be changed to conform with common sense so the mimimum is MAX(min-children, min-spare).
(In reply to RW from comment #1) > (In reply to jidanni from comment #0) > > OK, but setting this to 1 will cause logs to have > > > > Thu Jan 24 22:42:55 2019 [18861] info: prefork: server reached > > --max-children setting, consider raising it > > > > with no way to turn off the message. What if the user always processes > > his spam one by one serially, not in parallel? So please give him a way > > to disable this particular warning. > > In my experience you don't get this if you run one spamc instance at a time I take that back, you do get that message when a child dies and is respawned after max-conn-per-child.
Closing as not a bug report. This looks like a five year old discussion with no action required. If anyone has a suggestion to improve documentation, please open a new issue with suggested new text as an attachment.