Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

New versions of Perl are slower

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


julianokyap at gmail

Apr 10, 2012, 2:12 PM

Post #1 of 17 (1922 views)
Permalink
New versions of Perl are slower

I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
ports) on FreeBSD 8.2-RELEASE 64-bit.

I recently upgraded my Perl from 5.10 to 5.14 but I needed to
downgrade because SpamAssassin was crashing on a daily basis. See
bug:
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745

I have since downgraded my servers to Perl 5.10 and Perl 5.12.

I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
I think 5.14 was slow as well.

Average scan times are higher and there are often more 'longer
running' scans. This results in more output on servers running Perl
5.12:
tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'

Have others experienced the same thing?

- Julian


michael.scheidell at secnap

Apr 10, 2012, 3:49 PM

Post #2 of 17 (1895 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On 4/10/12 5:12 PM, Julian Yap wrote:
> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
> ports) on FreeBSD 8.2-RELEASE 64-bit.
>
> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
> downgrade because SpamAssassin was crashing on a daily basis. See
> bug:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>
> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>
Interesting... (im the maintainer of p5-Mail-SpamAssassin).
If they get a patch for this before 3.4 comes out, give me a heads up
and I can get it into the port.

> Have others experienced the same thing?
>
I am running amavisd-new in all of our commercial installations, so,
never saw a spamd crash :-)

But still, if we can get a patch to spamd to fix it, I am all for it.
(any idea if a copy of spamd from sa 3.4 will help?)
ps, if you can get them to package 3.4, I can push a
p5-Mail-SpamAssassin-devel out.

visit here and ping them:

<https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6689>


--
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
>*| *SECNAP Network Security Corporation

* Best Mobile Solutions Product of 2011
* Best Intrusion Prevention Product
* Hot Company Finalist 2011
* Best Email Security Product
* Certified SNORT Integrator

______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r).
For Information please see http://www.spammertrap.com/
______________________________________________________________________


julianokyap at gmail

Apr 10, 2012, 5:34 PM

Post #3 of 17 (1898 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On Tue, Apr 10, 2012 at 12:49 PM, Michael Scheidell
<michael.scheidell [at] secnap> wrote:
> On 4/10/12 5:12 PM, Julian Yap wrote:
>> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
>> ports) on FreeBSD 8.2-RELEASE 64-bit.
>>
>> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
>> downgrade because SpamAssassin was crashing on a daily basis.  See
>> bug:
>> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>>
>> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>>
> Interesting... (im the maintainer of p5-Mail-SpamAssassin).
> If they get a patch for this before 3.4 comes out, give me a heads up and I
> can get it into the port.
>
>
>> Have others experienced the same thing?
>>
> I am running amavisd-new in all of our commercial installations, so, never
> saw a spamd crash :-)

Are you running p5-Mail-SpamAssassin-3.3.2_6? Or do you run a
development release?

On the plus side I haven't experienced the crash on 5.12 but just a
generally slower scan speed compared to 5.10.


michael.scheidell at secnap

Apr 10, 2012, 5:38 PM

Post #4 of 17 (1896 views)
Permalink
Re: New versions of Perl are slower [In reply to]

p5-Mail-SpamAssassin-3.3.2_6.


--
Michael Scheidell, CTO
>|SECNAP Network Security


-----Original message-----
From: Julian Yap <julianokyap [at] gmail>
To: Michael Scheidell <michael.scheidell [at] secnap>
Cc: "users [at] spamassassin" <users [at] spamassassin>
Sent: Wed, Apr 11, 2012 00:35:04 GMT+00:00
Subject: Re: New versions of Perl are slower

On Tue, Apr 10, 2012 at 12:49 PM, Michael Scheidell
<michael.scheidell [at] secnap> wrote:
> On 4/10/12 5:12 PM, Julian Yap wrote:
>> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
>> ports) on FreeBSD 8.2-RELEASE 64-bit.
>>
>> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
>> downgrade because SpamAssassin was crashing on a daily basis. See
>> bug:
>> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>>
>> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>>
> Interesting... (im the maintainer of p5-Mail-SpamAssassin).
> If they get a patch for this before 3.4 comes out, give me a heads up and I
> can get it into the port.
>
>
>> Have others experienced the same thing?
>>
> I am running amavisd-new in all of our commercial installations, so, never
> saw a spamd crash :-)

Are you running p5-Mail-SpamAssassin-3.3.2_6? Or do you run a
development release?

On the plus side I haven't experienced the crash on 5.12 but just a
generally slower scan speed compared to 5.10.


parkerm at pobox

Apr 10, 2012, 7:28 PM

Post #5 of 17 (1894 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On Apr 10, 2012, at 4:12 PM, Julian Yap wrote:

> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
> ports) on FreeBSD 8.2-RELEASE 64-bit.
>
> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
> downgrade because SpamAssassin was crashing on a daily basis. See
> bug:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>
> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>
> I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
> I think 5.14 was slow as well.
>
> Average scan times are higher and there are often more 'longer
> running' scans. This results in more output on servers running Perl
> 5.12:
> tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'
>
> Have others experienced the same thing?

I think you can back that up and say that anything > 5.8 is slower. In perl 5.10 they made major changes to the regex engine which must have added some overhead that now slows things down. I've seen instances, depending on the total number of rules running, of 50% slowdowns moving from 5.8 -> 5.10 and beyond.

Michael


>
> - Julian


julianokyap at gmail

Apr 10, 2012, 7:50 PM

Post #6 of 17 (1892 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On Tue, Apr 10, 2012 at 4:28 PM, Michael Parker <parkerm [at] pobox> wrote:
> On Apr 10, 2012, at 4:12 PM, Julian Yap wrote:
>
>> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
>> ports) on FreeBSD 8.2-RELEASE 64-bit.
>>
>> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
>> downgrade because SpamAssassin was crashing on a daily basis.  See
>> bug:
>> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>>
>> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>>
>> I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
>> I think 5.14 was slow as well.
>>
>> Average scan times are higher and there are often more 'longer
>> running' scans.  This results in more output on servers running Perl
>> 5.12:
>> tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'
>>
>> Have others experienced the same thing?
>
> I think you can back that up and say that anything > 5.8 is slower.  In perl 5.10 they made major changes to the regex engine which must have added some overhead that now slows things down.  I've seen instances, depending on the total number of rules running, of 50% slowdowns moving from 5.8 -> 5.10 and beyond.

Hmm, thanks for the info. It certainly explains things. Yeah,
SpamAssassin previously used to blaze through mail scans (everything
scanned in less than 3 seconds) on the same hardware. It's annoying
that Perl is getting slower over time and there's no way to stop it
because older versions of Perl get deprecated.

- Julian


lee at dilkie

Apr 10, 2012, 7:57 PM

Post #7 of 17 (1895 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On 4/10/2012 10:50 PM, Julian Yap wrote:
> Hmm, thanks for the info. It certainly explains things. Yeah,
> SpamAssassin previously used to blaze through mail scans (everything
> scanned in less than 3 seconds) on the same hardware. It's annoying
> that Perl is getting slower over time and there's no way to stop it
> because older versions of Perl get deprecated. - Julian

I've found that bsdpan-Mail-SpamAssassin-CompiledRegexps makes a vast
improvement in rules regex scanning.

-lee


xtrade at matik

Apr 10, 2012, 11:09 PM

Post #8 of 17 (1889 views)
Permalink
Re: New versions of Perl are slower [In reply to]

Julian Yap wrote:
> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
> ports) on FreeBSD 8.2-RELEASE 64-bit.
>
> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
> downgrade because SpamAssassin was crashing on a daily basis. See
> bug:
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>
> I have since downgraded my servers to Perl 5.10 and Perl 5.12.


Hi

did you upgrade all perl related ports as well after perl upgrade?

I never saw this issue


>
> I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
> I think 5.14 was slow as well.
>
> Average scan times are higher and there are often more 'longer
> running' scans. This results in more output on servers running Perl
> 5.12:
> tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'
>
> Have others experienced the same thing?
>


this might be relative and depends on which tests you effectively run,
don't you agree?

specially network depending tests like dcc and others can influence this
times a lot

to say something exact, you probably need two different perl versions on
at least two identical machines with the same setup on the same network
running the same tests at the same time, getting the same messages
synchronously, and still, one may get faster response from a remote
resource than the other, kind of funny test for a perl comparison

Even doing so, I don't now if such a test or any mathematically average
scan time can say something at all about perl performance

IMO, if you really have scan times over 20 seconds (as you query your
log for) you may have other problems, not perl related problems

but as always, only my opinion

Hans



--
XTrade Assessory
International Facilitator
BR - US - CA - DE - GB - RU - UK
+55 (11) 4249.2222
http://xtrade.matik.com.br


KMcGrail at PCCC

Apr 11, 2012, 5:54 AM

Post #9 of 17 (1883 views)
Permalink
Re: New versions of Perl are slower [In reply to]

> ps, if you can get them to package 3.4, I can push a
> p5-Mail-SpamAssassin-devel out.
>
> visit here and ping them:
>
> <https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6689>
That's really not necessary. I know about the issue just haven't
figured out how in Jenkins to get it to do the build. I'll email them
today.

regards,
KAM


julianokyap at gmail

Apr 11, 2012, 12:07 PM

Post #10 of 17 (1888 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On Tue, Apr 10, 2012 at 8:09 PM, xTrade Assessory <xtrade [at] matik> wrote:
> Julian Yap wrote:
>> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
>> ports) on FreeBSD 8.2-RELEASE 64-bit.
>>
>> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
>> downgrade because SpamAssassin was crashing on a daily basis.  See
>> bug:
>> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>>
>> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>
> did you upgrade all perl related ports as well after perl upgrade?
>
> I never saw this issue

Yep.

2) Reinstall everything that depends on Perl:
sudo portupgrade -C -fr perl

>> I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
>>  I think 5.14 was slow as well.
>>
>> Average scan times are higher and there are often more 'longer
>> running' scans.  This results in more output on servers running Perl
>> 5.12:
>> tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'
>>
>> Have others experienced the same thing?
>
> this might be relative and depends on which tests you effectively run,
> don't you agree?
>
> specially network depending tests like dcc and others can influence this
> times a lot
>
> to say something exact, you probably need two different perl versions on
> at least two identical machines with the same setup on the same network
> running the same tests at the same time, getting the same messages
> synchronously, and still, one may get faster response from a remote
> resource than the other, kind of funny test for a perl comparison

Yeah, that's exactly what I have. Exactly the same tests, identical
hardware, network, etc...

- Julian


michael.scheidell at secnap

Apr 11, 2012, 12:38 PM

Post #11 of 17 (1890 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On 4/11/12 3:09 PM, Julian Yap wrote:
> Hey Michael,
>
> I noticed that in Perl 5.8, PERL_MALLOC is on by default and on 5.10
> onwards it is off by default. I have been building with the old
> option of PERL_MALLOC being on since I've been upgrading from old
> versions. Do you know if that makes any performance impact?
>
> - Julian
don't know, we always used WITH_PERL_MALLOC so I never tested it without.


--
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
>*| *SECNAP Network Security Corporation

* Best Mobile Solutions Product of 2011
* Best Intrusion Prevention Product
* Hot Company Finalist 2011
* Best Email Security Product
* Certified SNORT Integrator

______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r).
For Information please see http://www.spammertrap.com/
______________________________________________________________________


julianokyap at gmail

Apr 11, 2012, 5:23 PM

Post #12 of 17 (1882 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On Tue, Apr 10, 2012 at 4:57 PM, Lee Dilkie <lee [at] dilkie> wrote:
> On 4/10/2012 10:50 PM, Julian Yap wrote:
>
> Hmm, thanks for the info. It certainly explains things. Yeah, SpamAssassin
> previously used to blaze through mail scans (everything scanned in less than
> 3 seconds) on the same hardware. It's annoying that Perl is getting slower
> over time and there's no way to stop it because older versions of Perl get
> deprecated. - Julian
>
>
> I've found that bsdpan-Mail-SpamAssassin-CompiledRegexps makes a vast
> improvement in rules regex scanning.

Yep, I've been using that. Maybe I should run some tests with it disabled.

- Julian


lee at dilkie

Apr 11, 2012, 6:03 PM

Post #13 of 17 (1882 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On 4/11/2012 8:23 PM, Julian Yap wrote:
> On Tue, Apr 10, 2012 at 4:57 PM, Lee Dilkie <lee [at] dilkie> wrote:
>> On 4/10/2012 10:50 PM, Julian Yap wrote:
>>
>> Hmm, thanks for the info. It certainly explains things. Yeah, SpamAssassin
>> previously used to blaze through mail scans (everything scanned in less than
>> 3 seconds) on the same hardware. It's annoying that Perl is getting slower
>> over time and there's no way to stop it because older versions of Perl get
>> deprecated. - Julian
>>
>>
>> I've found that bsdpan-Mail-SpamAssassin-CompiledRegexps makes a vast
>> improvement in rules regex scanning.
> Yep, I've been using that. Maybe I should run some tests with it disabled.
>
> - Julian
are you sure it's being used after your perl upgrade? Perhaps that's
what you are seeing.

Maybe you need to re-compile your SA rules again.


julianokyap at gmail

Apr 11, 2012, 7:01 PM

Post #14 of 17 (1885 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On Wed, Apr 11, 2012 at 3:03 PM, Lee Dilkie <lee [at] dilkie> wrote:
> On 4/11/2012 8:23 PM, Julian Yap wrote:
>
> On Tue, Apr 10, 2012 at 4:57 PM, Lee Dilkie <lee [at] dilkie> wrote:
>
> On 4/10/2012 10:50 PM, Julian Yap wrote:
>
> Hmm, thanks for the info. It certainly explains things. Yeah, SpamAssassin
> previously used to blaze through mail scans (everything scanned in less than
> 3 seconds) on the same hardware. It's annoying that Perl is getting slower
> over time and there's no way to stop it because older versions of Perl get
> deprecated. - Julian
>
>
> I've found that bsdpan-Mail-SpamAssassin-CompiledRegexps makes a vast
> improvement in rules regex scanning.
>
> Yep, I've been using that. Maybe I should run some tests with it disabled.
>
> - Julian
>
> are you sure it's being used after your perl upgrade? Perhaps that's what
> you are seeing.
>
> Maybe you need to re-compile your SA rules again.

Nah, definitely using it. I run sa-compile after every test. I guess
things will never go back to Perl 5.8 speeds.

- Julian


xtrade at matik

Apr 12, 2012, 12:17 AM

Post #15 of 17 (1880 views)
Permalink
Re: New versions of Perl are slower [In reply to]

Julian Yap wrote:
>
> Yep.
>
> 2) Reinstall everything that depends on Perl:
> sudo portupgrade -C -fr perl
>

if you don't use -x perl will be reinstalled too, don't know if it
matters but once I did so (not using -x) I found lots of old files in
the perl dirs



>>> I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
>>> I think 5.14 was slow as well.
>>>
>>> Average scan times are higher and there are often more 'longer
>>> running' scans. This results in more output on servers running Perl
>>> 5.12:
>>> tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'
>>>



I'm still curious why you get over 20 sec scan times

will you share your experience?

I have several servers, and I find very few messages getting to 15
seconds even on the most busiest machines, most are not going beyond 5,
since numbers are better, I have 17msgs over 15 seconds but not passing
16.5 from 32400 processed msgs, daily average for last week for one of
my midsize server

I do not see any difference between machines with perl 5.8 or 5.14

Hans

--
XTrade Assessory
International Facilitator
BR - US - CA - DE - GB - RU - UK
+55 (11) 4249.2222
http://xtrade.matik.com.br


Bowie_Bailey at BUC

Apr 12, 2012, 7:29 AM

Post #16 of 17 (1875 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On 4/12/2012 3:17 AM, xTrade Assessory wrote:
>
> I'm still curious why you get over 20 sec scan times
>
> will you share your experience?
>
> I have several servers, and I find very few messages getting to 15
> seconds even on the most busiest machines, most are not going beyond 5,
> since numbers are better, I have 17msgs over 15 seconds but not passing
> 16.5 from 32400 processed msgs, daily average for last week for one of
> my midsize server

It all depends on the CPU, Memory, and what rules you are using.

My server (I am not the OP) is a 2.8GHz P4 with 1GB RAM. I am using the
sought and khop rules as well as razor and DCC. This server averages
15sec scan times (with Perl 5.8.5).

I could probably cut it down a bit with compiled rules, but one of the
mail accounts has some user rules that don't play well with the compiled
rules for some reason.

--
Bowie


ned at unixmail

Apr 13, 2012, 5:26 AM

Post #17 of 17 (1861 views)
Permalink
Re: New versions of Perl are slower [In reply to]

On 11/04/12 03:50, Julian Yap wrote:
> On Tue, Apr 10, 2012 at 4:28 PM, Michael Parker<parkerm [at] pobox> wrote:
>> On Apr 10, 2012, at 4:12 PM, Julian Yap wrote:
>>
>>> I'm running SpamAssassin 3.3.2 port revision 6 (latest from FreeBSD
>>> ports) on FreeBSD 8.2-RELEASE 64-bit.
>>>
>>> I recently upgraded my Perl from 5.10 to 5.14 but I needed to
>>> downgrade because SpamAssassin was crashing on a daily basis. See
>>> bug:
>>> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6745
>>>
>>> I have since downgraded my servers to Perl 5.10 and Perl 5.12.
>>>
>>> I have noticed that Perl 5.12 runs noticeably slower compared to 5.10.
>>> I think 5.14 was slow as well.
>>>
>>> Average scan times are higher and there are often more 'longer
>>> running' scans. This results in more output on servers running Perl
>>> 5.12:
>>> tail -f /var/log/maillog | grep 'identified spam .*[2-9][0-9].[0-9] seconds'
>>>
>>> Have others experienced the same thing?
>>
>> I think you can back that up and say that anything> 5.8 is slower. In perl 5.10 they made major changes to the regex engine which must have added some overhead that now slows things down. I've seen instances, depending on the total number of rules running, of 50% slowdowns moving from 5.8 -> 5.10 and beyond.
>
> Hmm, thanks for the info. It certainly explains things. Yeah,
> SpamAssassin previously used to blaze through mail scans (everything
> scanned in less than 3 seconds) on the same hardware. It's annoying
> that Perl is getting slower over time and there's no way to stop it
> because older versions of Perl get deprecated.
>
> - Julian
>

I see you're not on Linux, but RHEL-5 uses Perl-5.8 and still has 5
years of product life yet (supported until 2017):

$ rpm -q perl spamassassin
perl-5.8.8-38.el5.x86_64
spamassassin-3.3.2-2.el5.rfx.x86_64

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.