Richard Laager wrote:

> Does this mean it'd be a good idea to initialize SpamAssassin at the
> first use, rather than in filter_initialize()?

Doing it at first use is definitely better than in filter_initialize.
However, doing it outside any function may be better, because that happens
*before* the multiplexor calls fork() to create slaves.  In theory, this
lets the slaves share memory used by SpamAssassin.  In practice, it works
very poorly because of Perl's reference-counting that quickly dirties the
pages.

> It seems like if a bunch of slaves are going to end up processing only
> filter_sender or filter_relay, then initializing SpamAssassin in
> filter_initialize() is a waste of memory (given previously mentioned
> facts about reference counting, Perl, and copy-on-write).

Correct.  Note that you don't really gain anything from the "sticky"
scheduler unless your MX_MINIMUM is high enough to keep enough running
slaves to handle all the different commands.  If you use all the
features, that means at least 4: filter_relay, filter_sender,
filter_recipient and the filter_begin/filter/filter_end set.

I guess I should change the example filter.

Regards,

David.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to