Thinking OPEN

System Slows Using Red Hat-Bundled Perl

By Brad Reeves • Sep 3rd, 2008 • Category: Tips and Tricks

Issue:

Experiencing performance problems with Red Hat and Perl? The Perl that’s bundled with Red Hat, along with code that uses the bless/overload combination, can result in a severe system slow down. This is a known issue with Red Hat supplied Perl (Bug 379791).

Trick:

Here’s a test, some instructions on interpreting the results of the test, and suggestions on a solution to your system slow down.

First exercise Perl to determine if this known issue is, in fact, the problem you’re experiencing. To do so, run this test script:

#!/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 test script will print 50 dots on screen while using the bless operator. On a healthy system, the test should take less than 1 second to complete. With broken Red Hat Perl, the test takes much longer.

As of 8/21/08, there is a hotfix available from Red Hat for RHEL5u3 and RHEL5u2, RHEL4.5. However, users are still reporting performance issues with perl::DBI when bless/overload is utilized. For this reason, OpenLogic recommends that you obtain the latest Perl code from the Certified Library, and compile Perl yourself. The compilation of Perl is fairly straightforward, and should only take a few minutes on a server level platform. When implemented, OpenLogic Support has observed this solution result in 10X to 1000X improvement.

If you run into any problems, or have any questions about how to compile or distribute Perl, please contact OpenLogic support for instructions and help.

Relevant to: Red Hat RHEL4, RHEL5, Fedora 9, Red Hat supplied Perl version 5.8.8-10

Related OLEX Packages: perl
Brad Reeves

Brad Reeves
Linux. KDE. Open Source. Refuses to own an iPod. Drives a Mini Cooper. Brad's a Senior Content Engineer at OpenLogic but get this: he's also been a ski patrol guy, basketball coach, line cook, and trainer at HP (for starters). Brad has earned his guru status, and - if you want something done? Folks actually refer to him as the "office do-er of everything". Cooks veggies in all manner of delicious ways, but eats only meat. Able to benchpress any given 17 year old. This guy? Totally deserves the superman logo and if it weren't for that pesky copyright, we'd give it to him. In color.
All posts by Brad Reeves

Leave a Reply