[Ilugc] mod_perl & HTML::Mason Module

  • From: rajasuperman@xxxxxxxxx (Raja Subramanian)
  • Date: Fri Jul 23 12:51:02 2010

On Fri, Jul 23, 2010 at 1:20 AM, Ravi Jaya <ravi.goglobium@xxxxxxxxx> wrote:

""Loading CGI at runtime. ?You could increase shared memory between Apache
processes by preloading it in your httpd.conf or handler.pl file"".

If you pre-load all your Perl modules in the mod_perl parent process,
then every child process can share memory (RAM) with the parent
and reduce total RAM usage.  Without this, each child apache
process has to load all the modules individually into it's address
space and 1) increase RAM utilization, and 2) reduce performance.

See:
http://perl.apache.org/docs/1.0/guide/performance.html#Preloading_Perl_Modules_at_Server_Startup
http://perl.apache.org/docs/1.0/guide/performance.html
http://modperlbook.org/html/10-1-3-Preloading-Perl-Modules-at-Server-Startup.html


Without correct pre-loading, I've had mod_perl apps taking 800MB
RAM for every apache instance.  After correct pre-loading, the RAM
usage drops 1GB total for the entire apache mod_perl process.

Getting complex mod_perl apps to perform is a little tricky. For a
practical example, study the Request Tracker start up files and the
interaction with apache mod_perl.

- Raja

Other related posts: