Current Occupant ([info]occupant) wrote in [info]perl,

Perl moderately broken on RHEL

Hi LJ Perlers, long time lurker, first time poster.

This was a disturbing bit of news in my day. I had not noticed this due to usually compiling Perl manually, but I definitely have been suspecting something since I tried switching to the one RedHat ships. This guy just called it-- certain functions are really, really slow out of the box on RHEL-- and they just get slower the more you use them.

http://blog.vipul.net/2008/08/24/redhat-perl-what-a-tragedy/

He provides a test which should exit very quickly on a "good" perl, and will take many seconds on a broken one.

# Perl compiled manually, runs in a snap:
sandbox# time perl perftest
..................................................
real 0m0.108s
user 0m0.100s
sys 0m0.007s

# Redhat's stock Perl, took almost 19 seconds:
sandbox# time perl perftest
..................................................
real 0m18.868s
user 0m18.726s
sys 0m0.072s


To tell if Perl on a system you use is affected, run the following code:

#!/usr/bin/perl
use overload q(<) => sub {};
my %h;
for (my $i=0; $i<50000; $i++) {
$h{$i} = bless [ ] => 'main';
print STDERR '.' if $i % 1000 == 0;
}

The only reliable "fix" at this point is to not use RedHat's Perl, and to compile it manually, including anything linked against it like mod_perl. Not fun.

Hope this comes in handy and/or helps spread the rage I'm feeling right now.

  • Post a new comment

    Error

  • 6 comments

[info]muerte

August 25 2008, 21:23:26 UTC 3 years ago

That's a pretty serious problem, has it been reported to RedHat. They'll be ALL over a fix. That's a much better solution than compiling your own.

[info]muerte

August 25 2008, 21:30:11 UTC 3 years ago

Looks like this issue is already solved at the RedHat level:

https://bugzilla.redhat.com/show_bug.cgi?id=379791

[info]afromann

August 27 2008, 00:02:29 UTC 3 years ago

Not in the slightest.

Latest comment from RH on that ticket is that they are working on it.

Here's something from the perl 5 maintainers as to exactly what RH screwed up:
http://use.perl.org/~nicholas/journal/37274

[info]petdance

August 26 2008, 03:07:28 UTC 3 years ago

Why rage? Have you actually had a problem on this?

Here's my Perlbuzz article about it:
http://perlbuzz.com/2008/08/red-hats-patch-slows-down-overloading-in-perl.html

[info]occupant

August 26 2008, 04:21:02 UTC 3 years ago

Mainly just nerd-raging while I wait for a proper update. I'm not super impacted; I may use some libraries that are, but I am not creating millions of objects at a time in them.

Just feeling the authors point, it's disappointing that more people/companies likely moved away from Perl as a result of this packaging screwup. Not what it needs right now.

Anonymous

August 27 2008, 12:37:53 UTC 3 years ago

Some of these instances are very subtle.

Math::BigInt Math::BigFloat use overload - watch as your pricing daemon turns to treacle the more requests it serves.Or a long lived httpd that builds 100 URI objects per request.

Then there is your favorite XML package that loves to build element objects on the fly , all subclasses of something with 'use overload q("") => as_string;' , parse complex xml much ?




So was the horror of my afternoon reading.
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…