I plugged vmonitor in the mp2 test suite (which loads a lot of modules) and the conclusions are as following:

perl           Size Share VSize   Rss
non-threaded: 24.8M  8.3M 24.8M 20.6M
threaded    : 30.4M  8.6M 30.4M 26.2M

both running perl 5.8.6 under prefork mpm.

so you can see that while there is a difference is the total memory usage (but not all modules are loaded for the non-threaded case), there is not much difference between the two when it comes to shared memory.

While trying to shrink the test suite to find out where the unshared memory comes from I've discovered that 10.2MB come from loading Apache::TestRequest. I've verified that offline with:

perl-5.8.6-ithread bloat.pl 'use blib; use Apache::TestRequest'
use blib; use Apache::TestRequest added 10.2M

so *all* the memory used by A-TR (and modules it has loaded) was completely unshared. I don't know why that happens. A-TR is preloaded at the server startup. It's probably the case where perl has tons of variables which change, making all pages unshared.

I've run a quick test with mp1's test suite, and it seems to be quite similar (not much sharing)

So it's quite possible that this is a kernel issue (Linux rabbit.stason.org 2.6.8.1-12mdk here) or something that has to do with libc)

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to