Oh wise ones ....

I am having a Linux box configured, and have received different opinions on how best to configure mod_perl. While I have a working knowledge of Perl, actual box configuration is beyond my abilities. I've been trying to read up (and ask others) on the different approaches to configuring mod_perl, and am receiving different opinions. I'm posting this question in the hopes that some participants can shed some more light on this issue.

The core question I have involves two approaches to the configuration:

The first is a configuration with one instance of Apache, and two "cgi-bin" areas. Scripts that don't use mod_perl will point to the non-mod_perl cgi-bin area, and scripts that do use mod_perl will point to a separate cgi-bin area with mod_perl enabled.

The second approach involves configuring the box with two instances of Apache. Non mod_perl scripts and static pages will run in the Apache (at port 80, I believe), and scripts that use mod_perl will run in the second instance of Apache (which I believe will be running on a different port).

Here's the advantages and disadvantages to both approaches that have been offered:

Single instance of Apache .... the advantages are simplicity, no network changes, and speed. Disadvantages are large process size for static requests as well as dynamic requests, excessive RAM consumption, outputs to clients with slow connections ties up the processes.

Two instances of Apache ... advantages are static content is served without the mod_perl overhead (Apache instance 1) and larger mod_perl enabled processes are limited to specific scripts (Apache instance 2). Disadvantages are increased administration overhead - two config files and controlling scripts, merging two log files.

I may not have correctly articulated some of the technical explanations above, but again, my understanding of this issue is limited. I'm trying to get some input on the merits of which approach will best suit my needs. Some other related info:

The box has dual 2400 Mhz processors with a Gig of RAM each. The dynamically served pages represent %50-%60 of the data transferred.

My best shot at boiling all this into one sentence: Does the added complexity of a two-Apache configuration offer performance improvements/overhead-reduction that make the complexity worthwhile?


In reply to mod_perl - choosing best server configuration by Hagbone

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.