Hi,
I'm seeing the opposite results from pre-loading modules in the parent
process than I would expect. It looks like pre-loading modules ends up
using more non-shared ("private") memory.
This is on SunOS (SunOS Release 5.6 Version Generic_105181-17 [UNIX(R)
System V Release 4.0]), and I know very little about memory usage on that
machine other than some white paper I read a year ago that discussed the
pmap program. I'm using /usr/proc/bin/pmap to look at the memory of the
process.
/perl-status?inc is confirming the pre-loaded and non pre-loaded
configurations.
This is what pmap -x is showing:
Address Kbytes Resident Shared Private Permissions Mapped File
-------- ------ ------ ------ ------
total Kb 19968 18528 2816 15712 <<-- preloaded modules
total Kb 11528 10152 2656 7496 <<-- not preloaded
I'm curious why the "private" memory usage is so much more when pre-loading
the modules. It looks like, for memory concerns, I should not pre-load
modules.
Here's ps output from the pre-loaded test
S USER PID PPID %CPU %MEM VSZ RSS STIME TIME COMMAND
S lii 14096 1 0.0 0.3 7568 4688 10:25:50 0:00 httpd-t
S lii 14097 14096 0.0 0.9 19968 17136 10:25:50 0:05 httpd-t
I'm running an Apache 1.3.12/mod_perl 1.24 server with it only forking off
one child server (all request are handled by a single child process). I'm
making the same requests of the server each test, and I get the same
numbers if I repeat the test.
Here's the pre-loaded module list. When running as non-pre-loaded I'm
commenting out Search, SWISH::Fork, and CGI->compile lines below. That's
the only difference.
In the main httpd.conf server config.
<perl>
use lib qw (
/data/_g/lii/testLII/cgi-bin
/data/_g/lii/perl_lib/lib/5.00503
/data/_g/lii/perl_lib/lib/site_perl/5.005
/data/_g/lii/perl_lib/lib/site_perl/5.005/sun4-solaris
);
use Search ();
#use CGI ();
#use LII ();
# use Date::Format ();
# use Time::Local ();
# use Time::Zone ();
# use HTML::TokeParser ();
# use HTML ::Parser ();
# use HTML:: Entities ();
# use HTTP::Date ();
# use SWISH ();
# use SWISH::Stemmer ();
# use UserDB ();
# use DB_File ();
# use Fcntl ();
# use Tie::Hash ();
use SWISH::Fork ();
# use base ();
# use Symbol ();
# use Sys::Signal ();
# use IO::Handle ();
# use IO ();
# use SelectSaver ();
CGI->compile(':all');
</perl>
Bill Moseley
mailto:[EMAIL PROTECTED]