This is a discussion on Re: How many people use the Windows combo of Apache2 + mod_perl2 ? - modperl ; Hi, I'm replying below. > On Wed, 2006-04-26 at 17:20 +0200, Lionel MARTIN wrote: >> I'm preloading this module, using "PerlModule MyLoadingModule" in >> httpd.conf. > > Does that change if you load them via "use MyLoadingModule" in a > ...
I'm replying below.
> On Wed, 2006-04-26 at 17:20 +0200, Lionel MARTIN wrote:
>> I'm preloading this module, using "PerlModule MyLoadingModule" in
> Does that change if you load them via "use MyLoadingModule" in a
I can't understand how it could change using a startup.pl file? After all,
doing a PerlRequire startup.pl is just a way to incoporate code in the main
flow, isn't it?
Anyway, I gave it a try, and it gave exactly the same results:
Module Loaded: restart_count: 1 # Perl Interpreter:0x26ebbc
Module Loaded: restart_count: 2 # Perl Interpreter:0x150f29c
Module Loaded: restart_count: 1 # Perl Interpreter:0x26ec54
Module Loaded: restart_count: 2 # Perl Interpreter:0x1ac6014
>> I really would like to understand how the WinNT MPM is working, how
>> is shared, in order to make our coding more efficient.
>> The problem is that most docs about memory management under MP is abou
>> and I'm not sure the same rules apply...
> With Perl threads, no memory is shared. There is no advantage to
> preloading when using threads. It just makes the threads take longer to
I'm really sceptical (and probably lost) with what you're saying here.
First of all, from the MP docs itself
I can read that:
Rather than create a PerlInterperter per-thread by default, mod_perl creates
a pool of interpreters. The pool mechanism helps cut down memory usage a
great deal. As already mentioned, the syntax tree is shared between all
And concerning me, I couldn't believe there's no difference between
preloading components, and loading them at runtime, in term of memory
So, I made extensive tests, creating a simple component (a
PerlResponseHandler). I ma deocmparisons between preloading the handler, and
loading it at runtime, and then, using 8 concurrent accesses (with 8 Perl
Interpreters enabled by default), and I could see some difference in terms
of memory consumption.
I have got a lot of different results, but for example:
When preloading my compoennts, and asking Apache to start 8 Perl
Interpreters and then, making 8 concurtrent requests, this was taking 27968
kb of RAM for the main process and 29596 kb of RAM for the child process.
On the other hand, without preloading the handler, and then, making 8
concurrent requests (=> handler loaded on the fly), this was taking 11740kb
for the main process and 35252kb for the child process...
I don't know how to exactly interpret that, but that shows there are some
I really would love to understand how sharing is working, and what's exactly
shared (or perhaps have the confirmation that nothing is shared under winnt
I think that I should better try with LAMP as well, but to be honest, I have
never tried to install Linux.
Have you got any resources where I could read about how things are managed
> - Perrin