Optimising performance of Perl binary

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Optimising performance of Perl binary

    Hi,
    currently we are hosting a Perl 5.6.1 based Intranet application on a
    Sun 6x750MHz v880/Solaris 8 (64bit) server. The application performs a lot
    of CGI/DBI (Oracle DBD) interactions apart from the required 'business'
    processing. To try and improve the perfomance of this application after a
    recent upgrade, I am looking at recompiling Perl and associated modules with
    more agressive optimising and targeting of the platform. The developers are
    also attempting to squeeze more cycles out of the application.

    Originally the Perl was compiled with gcc 2.95.3 on a Sun Ultra 1/Solaris 8
    (32bit) with the default optimisation. I am recompiling with Sun Forte v7 on
    an UltraSparc II/Solaris 8 (64bit) server

    My questions are:

    1. Am I going to gain any performance compiling as a 64bit app, or should I
    stick with 32bit. The O/S and Oracle are 64bit.

    2. Are there any performance advantages moving to Perl 5.8? I read mixed
    reports on this.

    3. I am looking at using the Sun compiler options of -fast -xtarget=ultra3.
    Are there any others that I should consider (safe) with Perl? The
    appropriate spec.org reports indicate a number of other switches.

    4. Are there any advantages using third party (malloc) libraries like
    SmartHeap?

    5. Are there any other compilation/configuration issues I should consider?

    TIA


    Neil Griffin Guest

  2. Similar Questions and Discussions

    1. Optimising queries
      Hi! I wonder if anyone can tell me if there is anything I can do to make this set of queries a lot more efficient. Right now I have this code...
    2. Optimising a web app
      I have a web app using C# for coding. I need to track the "memory usage" and "performance" of the application. Are there any tools available for...
    3. binary perl
      Is it possible to make a perl script/program a binary file? I have a few scripts some one wants but I don't want them to have the source. I tried...
    4. Optimising speed
      Hello I made a webpage with 2 flash films and a navigation bar which is a javascript applet. They start all three at the same moment. Both movies...
    5. 64 bit binary and 32 bit binary have different result. Is it library bug or compiler bug?
      #include <errno.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <dirent.h> #include <assert.h> int main(int argc, char...
  3. #2

    Default Optimising performance of Perl binary

    Hi,
    currently we are hosting a Perl 5.6.1 based Intranet application on a
    Sun 6x750MHz v880/Solaris 8 (64bit) server. The application performs a lot
    of CGI/DBI (Oracle DBD) interactions apart from the required 'business'
    processing. To try and improve the perfomance of this application after a
    recent upgrade, I am looking at recompiling Perl and associated modules with
    more agressive optimising and targeting of the platform. The developers are
    also attempting to squeeze more cycles out of the application.

    Originally the Perl was compiled with gcc 2.95.3 on a Sun Ultra 1/Solaris 8
    (32bit) with the default optimisation. I am recompiling with Sun Forte v7 on
    an UltraSparc II/Solaris 8 (64bit) server

    My questions are:

    1. Am I going to gain any performance compiling as a 64bit app, or should I
    stick with 32bit. The O/S and Oracle are 64bit.

    2. Are there any performance advantages moving to Perl 5.8? I read mixed
    reports on this.

    3. I am looking at using the Sun compiler options of -fast -xtarget=ultra3.
    Are there any others that I should consider (safe) with Perl? The
    appropriate spec.org reports indicate a number of other switches.

    4. Are there any advantages using third party (malloc) libraries like
    SmartHeap?

    5. Are there any other compilation/configuration issues I should consider?

    TIA


    Neil Griffin Guest

  4. #3

    Default Re: Optimising performance of Perl binary

    On my servers, I have Perl compiled for max optimization. I have had
    not problems with Perl running in this matter.

    On the Oracle side, you should have your developers ensure all preapre()
    calls are using '{ora_check_sql => 0}'. Without this, each SQL
    statement will be described and then parsed (double parsing) which will
    eat up a lot of CPU on an active server.

    Neil Griffin wrote:
    > Hi,
    > currently we are hosting a Perl 5.6.1 based Intranet application on a
    > Sun 6x750MHz v880/Solaris 8 (64bit) server. The application performs a lot
    > of CGI/DBI (Oracle DBD) interactions apart from the required 'business'
    > processing. To try and improve the perfomance of this application after a
    > recent upgrade, I am looking at recompiling Perl and associated modules with
    > more agressive optimising and targeting of the platform. The developers are
    > also attempting to squeeze more cycles out of the application.
    >
    > Originally the Perl was compiled with gcc 2.95.3 on a Sun Ultra 1/Solaris 8
    > (32bit) with the default optimisation. I am recompiling with Sun Forte v7 on
    > an UltraSparc II/Solaris 8 (64bit) server
    >
    > My questions are:
    >
    > 1. Am I going to gain any performance compiling as a 64bit app, or should I
    > stick with 32bit. The O/S and Oracle are 64bit.
    >
    > 2. Are there any performance advantages moving to Perl 5.8? I read mixed
    > reports on this.
    >
    > 3. I am looking at using the Sun compiler options of -fast -xtarget=ultra3.
    > Are there any others that I should consider (safe) with Perl? The
    > appropriate spec.org reports indicate a number of other switches.
    >
    > 4. Are there any advantages using third party (malloc) libraries like
    > SmartHeap?
    >
    > 5. Are there any other compilation/configuration issues I should consider?
    >
    > TIA
    >
    >

    --
    Ron Reidy
    Oracle DBA

    Ron Reidy Guest

  5. #4

    Default Re: Optimising performance of Perl binary

    Neil Griffin wrote:
    > Hi,
    > currently we are hosting a Perl 5.6.1 based Intranet application on a
    > Sun 6x750MHz v880/Solaris 8 (64bit) server. The application performs a lot
    > of CGI/DBI (Oracle DBD) interactions apart from the required 'business'
    > processing. To try and improve the perfomance of this application after a
    > recent upgrade, I am looking at recompiling Perl and associated modules with
    > more agressive optimising and targeting of the platform. The developers are
    > also attempting to squeeze more cycles out of the application.
    >
    > Originally the Perl was compiled with gcc 2.95.3 on a Sun Ultra 1/Solaris 8
    > (32bit) with the default optimisation. I am recompiling with Sun Forte v7 on
    > an UltraSparc II/Solaris 8 (64bit) server
    >
    > My questions are:
    >
    > 1. Am I going to gain any performance compiling as a 64bit app, or should I
    > stick with 32bit. The O/S and Oracle are 64bit.
    >
    > 2. Are there any performance advantages moving to Perl 5.8? I read mixed
    > reports on this.
    >
    > 3. I am looking at using the Sun compiler options of -fast -xtarget=ultra3.
    > Are there any others that I should consider (safe) with Perl? The
    > appropriate spec.org reports indicate a number of other switches.
    >
    > 4. Are there any advantages using third party (malloc) libraries like
    > SmartHeap?
    >
    > 5. Are there any other compilation/configuration issues I should consider?
    >
    ....


    I would be amazed if you gain enough from compiler optimizations and the
    like to make it worth the time and effort involved (and the time spent
    fighting potential compiler bugs in the fancier optimizations). You
    don't mention the use of mod_perl. If you are not using mod_perl or
    something equivalent, you could gain speed by orders of magnitude by
    using it. You would need to move to the Apache web server.
    Well-written Perl CGI scripts need no modification. This basically
    functions by holding a Perl interpreter and a compiled Perl process
    ready-to-go for new CGI requests, with no need to start a process, load
    the Perl interpreter and script, and compile the script each time. It
    just goes right to running the script. Also, a connection to your
    database is held open so that doesn't need to be established each time
    either. The result is a truly dramatic improvement in performance.

    --
    Bob Walton

    Bob Walton Guest

  6. #5

    Default Re: Optimising performance of Perl binary

    The developers are indeed moving to Mod-Perl, but aren't quite there yet.
    The re-architecting of application to support Mod-Perl and other changes is
    part of the reason why the performance has gone backwards :-(

    I'm just trying to wring the most out of the platform that I can... 5-10%
    here or there would be useful.

    Thanks for the feedback.

    Bob Walton wrote in message <3F64C4A6.6010602@rochester.rr.com>...
    >Neil Griffin wrote:
    >
    >> Hi,
    >> currently we are hosting a Perl 5.6.1 based Intranet application on a
    >> Sun 6x750MHz v880/Solaris 8 (64bit) server. The application performs a
    lot
    >> of CGI/DBI (Oracle DBD) interactions apart from the required 'business'
    >> processing. To try and improve the perfomance of this application after a
    >> recent upgrade, I am looking at recompiling Perl and associated modules
    with
    >> more agressive optimising and targeting of the platform. The developers
    are
    >> also attempting to squeeze more cycles out of the application.
    >>
    >> Originally the Perl was compiled with gcc 2.95.3 on a Sun Ultra 1/Solaris
    8
    >> (32bit) with the default optimisation. I am recompiling with Sun Forte v7
    on
    >> an UltraSparc II/Solaris 8 (64bit) server
    >>
    >> My questions are:
    >>
    >> 1. Am I going to gain any performance compiling as a 64bit app, or should
    I
    >> stick with 32bit. The O/S and Oracle are 64bit.
    >>
    >> 2. Are there any performance advantages moving to Perl 5.8? I read mixed
    >> reports on this.
    >>
    >> 3. I am looking at using the Sun compiler options
    of -fast -xtarget=ultra3.
    >> Are there any others that I should consider (safe) with Perl? The
    >> appropriate spec.org reports indicate a number of other switches.
    >>
    >> 4. Are there any advantages using third party (malloc) libraries like
    >> SmartHeap?
    >>
    >> 5. Are there any other compilation/configuration issues I should
    consider?
    >>
    >...
    >
    >
    >I would be amazed if you gain enough from compiler optimizations and the
    >like to make it worth the time and effort involved (and the time spent
    >fighting potential compiler bugs in the fancier optimizations). You
    >don't mention the use of mod_perl. If you are not using mod_perl or
    >something equivalent, you could gain speed by orders of magnitude by
    >using it. You would need to move to the Apache web server.
    >Well-written Perl CGI scripts need no modification. This basically
    >functions by holding a Perl interpreter and a compiled Perl process
    >ready-to-go for new CGI requests, with no need to start a process, load
    >the Perl interpreter and script, and compile the script each time. It
    >just goes right to running the script. Also, a connection to your
    >database is held open so that doesn't need to be established each time
    >either. The result is a truly dramatic improvement in performance.
    >
    >--
    >Bob Walton
    >

    Neil Griffin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139