Re: Loading modules in Parent??
On Thu, 28 Sep 2000, Bill Moseley wrote: > 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. ... > 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. that's a BIG difference. % perlbloat 'require CGI' require CGI added 784k % perlbloat 'require CGI; CGI->compile(":all")' require CGI; CGI->compile(":all") added 2.0M try without preloading CGI.pm/CGI->compile in either. p.s. this is the perlbloat script: use GTop (); my $gtop = GTop->new; my $before = $gtop->proc_mem($$)->size; for (@ARGV) { if (eval "require $_") { eval { $_->import; }; } else { eval $_; die $@ if $@; } } my $after = $gtop->proc_mem($$)->size; printf "@ARGV added %s\n", GTop::size_string($after - $before);
Re: Loading modules in Parent??
At 12:04 AM 10/02/00 -0600, Scott Wilson wrote: >I've seen a similar result on an IRIX installation I'm working on. >Anyone have any ideas? So did you decide NOT to pre-load modules? > > Scott > >Bill Moseley wrote: >> >> Won't someone comment on this post? That's a chunk of memory! >> >> At 11:46 AM 09/28/00 -0700, Bill Moseley wrote: >> >> >This is what pmap -x is showing: >> > >> >Address Kbytes Resident Shared Private Permissions Mapped File >> > -- -- -- -- >> >total Kb 19968 185282816 15712 <<-- preloaded modules >> >total Kb 11528 1015226567496 <<-- not preloaded >> >> It's almost all heap: >> 00164000 16376 15256 312 14944 read/write/exec[ heap ] >> 0016400075926608 1046504 read/write/exec[ heap ] >> >> Is this an issue just with Solaris or is this expected (and seen) on other >> platforms? >> >> Bill Moseley >> mailto:[EMAIL PROTECTED] > > Bill Moseley mailto:[EMAIL PROTECTED]
Re: Loading modules in Parent??
Won't someone comment on this post? That's a chunk of memory! At 11:46 AM 09/28/00 -0700, Bill Moseley wrote: >This is what pmap -x is showing: > >Address Kbytes Resident Shared Private Permissions Mapped File > -- -- -- -- >total Kb 19968 185282816 15712 <<-- preloaded modules >total Kb 11528 1015226567496 <<-- not preloaded It's almost all heap: 00164000 16376 15256 312 14944 read/write/exec[ heap ] 0016400075926608 1046504 read/write/exec[ heap ] Is this an issue just with Solaris or is this expected (and seen) on other platforms? Bill Moseley mailto:[EMAIL PROTECTED]
Loading modules in Parent??
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 185282816 15712 <<-- preloaded modules total Kb 11528 1015226567496 <<-- 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 RSSSTIMETIME COMMAND S lii 14096 1 0.0 0.3 7568 4688 10:25:500:00 httpd-t S lii 14097 14096 0.0 0.9 19968 17136 10:25:500: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. 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'); Bill Moseley mailto:[EMAIL PROTECTED]