Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Static Perl

by Anonymous Monk
on Mar 18, 2008 at 23:51 UTC ( [id://674900]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

The Perl FAQ page states the following:


"If you're currently linking your perl executable to a
shared libc.so, you can often gain a 10-25% performance
benefit by rebuilding it to link with a static libc.a
instead. This will make a bigger perl executable, but your
Perl programs (and programmers) may thank you for it. See
the INSTALL file in the source distribution for more
information."

Is this really recommended? Is the performance gain only
seen in cases where a script is invoked many times (CGI)
or would it also benefit a long running perl process?

Replies are listed 'Best First'.
Re: Static Perl
by Joost (Canon) on Mar 19, 2008 at 01:08 UTC
    Is this really recommended?
    I'm not sure. I think if you really want to improve perl loading performance, you'd just set the sticky bit on the perl executable.

    In any case, I don't think it would matter for any situation where you're not exec()ing many perl interpreters a second, and some kind of persistent server solution - like mod_perl, fastcgi or a pure-perl server - would be much faster than anything this trick would offer.

      I think if you really want to improve perl loading performance, you'd just set the sticky bit on the perl executable.

      Does the sticky bit still work in this way anywhere? According to Wikipedia it seems to be ignored (or used to do completely different things) on most operating systems (they mention that HP-UX supports it).

Re: Static Perl
by sundialsvc4 (Abbot) on Mar 19, 2008 at 12:58 UTC

    I honestly don't know how current or relevant that admonition may be. My understanding, too, is that the “sticky bit” is an anachronism now.

    My experience has been that most operating systems these days are very good at caching file-buffers on their own. So the first time you run a program, it takes a little longer than it does for the rest of the day. But if you run a bunch of other things in the meantime, it takes a little longer again.

    So, maybe the best thing to do for you is to just experiment. Try it both ways. And of course, “if it's not really hurting now, don't bother.”

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://674900]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-03-28 19:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found