Stas Bekman wrote:
The perl shipped with RH 9 (actually a 5.8.0 + lots of patches) is compiled with threads and with a shared libperl.so, two factors that are known to slow things down. I think that 5.8.0 is slower than 5.6.x, but not considerably. However I have no definitive numbers either.
I know about the threads issue. But it's a first time I hear about a shared libperl.so. Is it relevant to mod_perl? It gets loaded at the server startup and I think produces no overhead at run-time. Or does it? Is it about resolving symbols at run-time vs. PERL_DL_NONLAZY=1, which doesn't happen in the static library?
For discussion about this, see the INSTALL file, section "Building a shared Perl library". You're right, maybe this doesn't impact mod_perl.
Hmm, I wonder about this para from that file:
--- In terms of performance, on my test system (Solaris 2.5_x86) the perl test suite took roughly 15% longer to run with the shared libperl.so. Your system and typical applications may well give quite different results. ---
The whole point of using shared libs is that if there are more than one app using the same library it gets loaded only once. I don't know who wrote the claim above, but have you tried doing perl -le 'sleep 1000 while 1' in another window (of course using the same perl) and then start the test suite? This way libperl.so will be constantly loaded and won't cause the loading overhead. I suppose that depending on the OS the loader may even remember the symbols it has resolved at run-time. The perl test suite spawns a lot of fresh perls which causes most of the overhead.
PERL_DL_NONLAZY is only for XS modules (AFAIK).
Could be. But I what I meant is whatever the dlopen flag for resolving symbols right away is, and not doing the lazy loading. This is of course of other perl programs can benefit from this resolving. If not it will just slow things down.
Actually on several OSs you have no choice but to resolve all the symbols when the shared library is loaded (OS X?), which in case of libperl.so makes a huge overhead if you just need a few dozen of symbols out of 4K+ symbols.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html