6MB less RAM available might mean that you have to run 3 fewer apache processes.

Even then. That assumes 2 MB of unshared memory per process. Suppose a bare server with Apache's parent process uses 128 MB and you have 1024 MB installed, which is not uncommon for modern x86 based servers. Still enough memory to run 448 apache processes. If your CPU and I/O (filesystem/disk mostly) can handle that amount of requests simultaneously, you should have bought more than 1 GB of RAM, since 1 GB is not at all much for systems like that.

The important thing to get from this is that importing can add up in a persistent multi-process environment, and it should be used wisely.

Importing should be done wisely, but it should not be avoided. If you explicitly request only the symbols that you use, it's always worth it. If you use all of the 158 symbols that CGI.pm's :standard tag exports, then by all means have it export them, because the overhead of importing is nothing compared to the overhead of using them, and typing "CGI::" 158 or more times *will* drive you crazy :)

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


In reply to Re: Re: Re: Re: Re: Re^2: Pragma (more) like Java's 'import'? (importing and mod_perl) by Juerd
in thread Pragma (more) like Java's 'import'? by djantzen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.