Current Occupant (occupant) wrote in perl,
Current Occupant
occupant
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.
Subscribe
  • Post a new comment

    Error

    default userpic
  • 6 comments