Hagbone has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: mod_perl - choosing best server configuration
by domm (Chaplain) on Mar 19, 2003 at 14:57 UTC | |
Re: mod_perl - choosing best server configuration
by shotgunefx (Parson) on Mar 19, 2003 at 14:49 UTC | |
Re: mod_perl - choosing best server configuration
by perrin (Chancellor) on Mar 19, 2003 at 15:17 UTC | |
Re: mod_perl - choosing best server configuration
by Hagbone (Monk) on Mar 19, 2003 at 18:32 UTC | |
Re: mod_perl - choosing best server configuration
by Hagbone (Monk) on Mar 19, 2003 at 16:02 UTC | |
by merlyn (Sage) on Mar 19, 2003 at 17:53 UTC |