Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Memory needed for perl process

by bsshetty17 (Acolyte)
on Jun 23, 2017 at 06:26 UTC ( [id://1193334]=perlquestion: print w/replies, xml ) Need Help??

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

Hi Monks, 2 quick questions. 1) What is the minimum memory required to start a perl process? 2)I need to install following cpan modules in HP_UX: \t Text::CSV_XS; \t SOAP::Lite; \t XML::Twig; \t Config::IniFiles; \t Parallel::ForkManager; Informatica is also installed in the same server. Informatica administrator is not agreeing to install the modules saying, It causes the informatica performance degradation. Can any one help to defend this? Thanks,

Replies are listed 'Best First'.
Re: Memory needed for perl process
by Corion (Patriarch) on Jun 23, 2017 at 07:07 UTC

    Since Perl modules are only files, I don't see how merely adding files that are not used now would degrade the performance of non-Perl programs.

    Maybe there is a miscommunication between you and the administrator of the Informatica program/machine. Maybe the administrator means that running Perl programs on the machine will degrade the performance of Informatica. This could easily be true as there only is a finite amount of CPU and other resources which Informatica would need to share with other programs.

    Maybe also the administrator does not want to do the extra work needed for installing modules.

    My suggestion to you is to talk again with the administrator and find out their true motivation.

    If the objection is that the machine does not have enough power for additional processes, you could find another machine to run your processes on.

    If the objection is that the administrator does not want (or know) to install the modules you could offer help there or install the modules in a private directory together with your program. See local::lib and Yes, even you can use CPAN.

Re: Memory needed for perl process
by zentara (Archbishop) on Jun 23, 2017 at 11:32 UTC
    Hi, if you compile the perl as a shared executable, you will get a perl executable of 15920 bytes and a libperl.so of 2125160 bytes. The ldd for perl involves a few shared libraries, but not many.
    # ldd perl_shared linux-vdso.so.1 libperl.so => /usr/lib/perl5/5.24.1/x86_64-linux-thread-multi- +ld/CORE/libperl.so libpthread.so.0 => /lib64/libpthread.so.0 libnsl.so.1 => /lib64/libnsl.so.1 libdl.so.2 => /lib64/libdl.so.2 libm.so.6 => /lib64/libm.so.6 libcrypt.so.1 => /lib64/libcrypt.so.1 libutil.so.1 => /lib64/libutil.so.1 libc.so.6 => /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2

    For a static perl, the executable size is 1956240 bytes, and it's ld dependencies are same as above with the exception of libperl.so.

    This is on my Slackware system, and the Perl version is 5.24.1 .

    So the minimum Perl footprint would be the static build at 1.9 Megs. Alot of power in what is a size less than most electronic photos.

    If I run a simple perl script, waiting for input on STDIN, this is it's process info:

    zentara 1981 0.0 0.0 22820 3712 pts/1 S+ 07:27 0:00 /usr/ +bin/perl ./STDIN-input
    thats shows 22820. But remember, that didn't load any modules or do any other memory aquisition like declaring large variables.

    I'm not really a human, but I play one on earth. ..... an animated JAPH
Re: Memory needed for perl process
by talexb (Chancellor) on Jun 23, 2017 at 14:01 UTC
      What is the minimum memory required to start a perl process?

    This probably depends on the OS and the version of Perl -- but the question itself is a red herring -- on today's systems (unless you're trying to run Perl on an Arduino), there's plenty of memory to run Perl.

      Informatica administrator is not agreeing to install the modules saying, It causes the informatica performance degradation.

    This gave me my morning smile.

    More seriously, this administrator has mis-spoken. Installing the modules won't affect the performance of Informatica. Running a script that uses the modules might. Is the Informatica server running flat out, 24/7? no, I didn't think so.

    It sounds like you're planning on running something big, if it involves those modules, however. I've been doing ETL development for the last two years, and I run scripts on a virtual machine that sometimes take a minute or two to finish; however, there was one that took 5.5 hours to run. That type of script would have an impact on Informatica, both on the CPU load and on the hard drive sub-system.

    I'm guessing this is on a Windows server, an environment that's not as friendly as Linux to multi-tasking. Not knowing your situation at all, is there a way you could run this on your local machine, or alternatively, on a Linux server?

    This sounds like a political issue, not a technical issue. :)

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

    Update: I missed that the platform was HPUX -- my bad. I just read Informatica (which is being used by another team at my site), and ASSUMED Windows.

      > I'm guessing this is on a Windows server

      > > I need to install following cpan modules in HP_UX

      [emphasis mine]

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      I'm guessing this is on a Windows server, an environment that's not as friendly as Linux to multi-tasking.

      Oooh. I could take serious issue with that statement. Suffice it to say, Windows Server is very good at multi-tasking out of the box, and can be truly excellent if used properly.

      This sounds like a political issue, not a technical issue.

      Agreed. Definitely sounds like either: a) someone doesn't want others interfering in his fiefdom; b) or he is scared of introducing anything he doesn't know about into the small pond in which he is the big fish.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
      In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
Re: Memory needed for perl process
by bsshetty17 (Acolyte) on Jun 30, 2017 at 06:30 UTC

    Thanks everyone.

Re: Memory needed for perl process
by sundialsvc4 (Abbot) on Jun 23, 2017 at 14:08 UTC

    The actual memory footprint of Perl is quite modest, compared to that of other languages (notably, PHP), because it does depend very heavily on loadable binary-library modules as well as source-code that must be used.   The Perl (5...) executable is small enough by itself to qualify as “tiny,” because very little is actually “built in.”   The actual memory footprint of a particular application can be safely judged only by inspection of a running instance.   (Could be something as simple as the Linux/Unix top command, or any process-monitor.)   It is possible that part of your colleague’s concern has to do with multi-threading, and/or the size of files that you might possibly be processing.   But, none of these purely-technical considerations will help you here.

    As Corion aptly describes, you have mostly a political problem.   That is to say, a problem that must be negotiated.   Although it is possible for you to install modules locally – Google (or Super Search) almost anything about “running Perl in a shared-hosting environment” – this would not be an appropriate thing to do in this case.   (It could be seen as insubordination ... career suicide ... and given the resource constraints it is also “just the wrong engineering thing to do.”)   The Powers That Be™ have dictated the limits of the hardware that all you have to use, which strictures neither of you can control, and Informatica appears to be the primary business-purpose for this box.   Expectations as to its (Informatica ..) performance might be along some business activity’s critical path, which you probably do not know about.

    You need to negotiate an implementation strategy for your project that is suitable to both of you, and to the manager(s) at all levels until, and including, the point at which both management chains-of-command intersect, since all of these managers are also legitimate potential stakeholders in the outcome, and since they will know about those critical paths in the various project plans.   The impact to production must be clearly revealed, understood and then agreed-to so that no one is ever blindsided.   I predict that the solution will largely consist of moving your project to another available box having sufficient capacity.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-24 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found