You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Carsten <po...@gmail.com> on 2015/04/10 14:21:56 UTC
overhead by using meta rules?
Hi @all,
i have a questtion.
Does a meta-rule consume more power oder time to process than a standard
header or body rule?
Example:
simple rule
-----------
header MY_HEADER_100 Subject =~ /Just a test-subject/
score MY_HEADER_100 5
meta-rule
----------
header __MY_COMBO__R1 Subject =~ /Just a test-subject/
meta MY_COMBO_100 (__MY_COMBO__R1)
score MY_COMBO_100 5
Background:
I have hundreds of manual rules, and if meta-rules had no overhead, i
would always write meta-rules, so i can easyly add test-cases to the rule.
Best regards
Carsten
Re: overhead by using meta rules?
Posted by Joe Quinn <jq...@pccc.com>.
On 4/10/2015 8:45 AM, Axb wrote:
> On 04/10/2015 02:33 PM, Kevin A. McGrail wrote:
>> On 4/10/2015 8:21 AM, Carsten wrote:
>>> Does a meta-rule consume more power oder time to process than a
>>> standard header or body rule?
>>> Background:
>>> I have hundreds of manual rules, and if meta-rules had no overhead, i
>>> would always write meta-rules, so i can easyly add test-cases to the
>>> rule.
>> It's technically adding overhead because it's two rules. First the
>> subtest and second, the test. How much overhead, I couldn't tell you.
>>
>> I write primarily meta tests but I wouldn't write a test as a meta with
>> just one condition.
>>
>> Beyond this answer, you'd have to do some benchmarking which there are
>> some plugins to help. See
>> https://wiki.apache.org/spamassassin/FasterPerformance and the slow
>> rules might help. I think you would have to write it one way, run
>> timings and run the second way and run again. No idea if the timing
>> will be accurate enough for this to be helpful because I predict the
>> overhead to be very minimal.
>
> minimal overhead *n = big overhead
>
> my BCP advice would be:
>
> if I you want to score the rule, score it and avoid __RULE
> if you don't want to score it and only use it in metas then use __RULE
I did some very brief and /very/ rough testing with --cf and a
production configuration, adding 5000 bogus meta rules (which is larger
than the whole of sa-update right now).
The extra meta rules did not even blip. I wouldn't worry about it.
Re: overhead by using meta rules?
Posted by Axb <ax...@gmail.com>.
On 04/10/2015 03:15 PM, Matus UHLAR - fantomas wrote:
>>> On 4/10/2015 8:21 AM, Carsten wrote:
>>>> Does a meta-rule consume more power oder time to process than a
>>>> standard header or body rule?
>>>> Background:
>>>> I have hundreds of manual rules, and if meta-rules had no overhead, i
>>>> would always write meta-rules, so i can easyly add test-cases to the
>>>> rule.
>
> On 10.04.15 14:45, Axb wrote:
>> minimal overhead *n = big overhead
>>
>> my BCP advice would be:
>>
>> if I you want to score the rule, score it and avoid __RULE
>> if you don't want to score it and only use it in metas then use __RULE
>
> there are rules that some want to score and some want to use them only in
> meta-rules. The famous example is RP_MATCHES_RCVD, a few times criticised
> here.
>
> zeroing such rule would make the metas ineffective as well.
>
> trying with meta rules it imho not a bad idea.
or
score RP_MATCHES_RCVD 0.0001
helps to track hits & misses
__RULES often get forgotten and if unwatched, over years, become
expensive bit rot. SA's masschecks handle lots of that...
Re: overhead by using meta rules?
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>>On 4/10/2015 8:21 AM, Carsten wrote:
>>>Does a meta-rule consume more power oder time to process than a
>>>standard header or body rule?
>>>Background:
>>>I have hundreds of manual rules, and if meta-rules had no overhead, i
>>>would always write meta-rules, so i can easyly add test-cases to the
>>>rule.
On 10.04.15 14:45, Axb wrote:
>minimal overhead *n = big overhead
>
>my BCP advice would be:
>
>if I you want to score the rule, score it and avoid __RULE
>if you don't want to score it and only use it in metas then use __RULE
there are rules that some want to score and some want to use them only in
meta-rules. The famous example is RP_MATCHES_RCVD, a few times criticised
here.
zeroing such rule would make the metas ineffective as well.
trying with meta rules it imho not a bad idea.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Christian Science Programming: "Let God Debug It!".
Re: overhead by using meta rules?
Posted by Axb <ax...@gmail.com>.
On 04/10/2015 02:33 PM, Kevin A. McGrail wrote:
> On 4/10/2015 8:21 AM, Carsten wrote:
>> Does a meta-rule consume more power oder time to process than a
>> standard header or body rule?
>> Background:
>> I have hundreds of manual rules, and if meta-rules had no overhead, i
>> would always write meta-rules, so i can easyly add test-cases to the
>> rule.
> It's technically adding overhead because it's two rules. First the
> subtest and second, the test. How much overhead, I couldn't tell you.
>
> I write primarily meta tests but I wouldn't write a test as a meta with
> just one condition.
>
> Beyond this answer, you'd have to do some benchmarking which there are
> some plugins to help. See
> https://wiki.apache.org/spamassassin/FasterPerformance and the slow
> rules might help. I think you would have to write it one way, run
> timings and run the second way and run again. No idea if the timing
> will be accurate enough for this to be helpful because I predict the
> overhead to be very minimal.
minimal overhead *n = big overhead
my BCP advice would be:
if I you want to score the rule, score it and avoid __RULE
if you don't want to score it and only use it in metas then use __RULE
Re: overhead by using meta rules?
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 4/10/2015 8:21 AM, Carsten wrote:
> Does a meta-rule consume more power oder time to process than a
> standard header or body rule?
> Background:
> I have hundreds of manual rules, and if meta-rules had no overhead, i
> would always write meta-rules, so i can easyly add test-cases to the
> rule.
It's technically adding overhead because it's two rules. First the
subtest and second, the test. How much overhead, I couldn't tell you.
I write primarily meta tests but I wouldn't write a test as a meta with
just one condition.
Beyond this answer, you'd have to do some benchmarking which there are
some plugins to help. See
https://wiki.apache.org/spamassassin/FasterPerformance and the slow
rules might help. I think you would have to write it one way, run
timings and run the second way and run again. No idea if the timing
will be accurate enough for this to be helpful because I predict the
overhead to be very minimal.
Regards,
KAM