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/re
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.
August 25 2008, 21:23:26 UTC 3 years ago
August 25 2008, 21:30:11 UTC 3 years ago
https://bugzilla.redhat.com/show_bug.cg
August 27 2008, 00:02:29 UTC 3 years ago
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/3
August 26 2008, 03:07:28 UTC 3 years ago
Here's my Perlbuzz article about it:
http://perlbuzz.com/2008/08/red-hats-pa
August 26 2008, 04:21:02 UTC 3 years ago
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
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.