You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by da...@apn.co.nz on 2005/09/20 00:13:39 UTC

mod_perl, shared memory and solaris

Hi

I've set up mod_perl v1.29 with apache 1.3.33 and I'm trying to maximise 
the amount of memory shared between the httpd processes. 

I've created a startup.pl file and have entered all modules I use, and 
have loaded the specific the DB driver etc.  I'm not using CGI, and only 
one custom module is installed (which in turn uses the CPAN modules in the 
startup file)

The problem I have is the top and ps commands don't give the shared memory 
size. However, if I issue

ipcs -m

there are no shared memory segments. Should mod_perl make use of them? 
Likewise, when I issue

/usr/proc/bin/pmap <apache proc_id> | grep "shmid"

no shared memory is listed.

The problem is, each http process seems to be about 18M. This isn't a big 
deal if most of the memory (even half)  is shared, but it doesn't seem to 
be as far as I can tell.

Any advice on memory use on Solaris is appreciated

regards

Dan

********************************************************************************
NOTICE
This email and any attachments are confidential. They may contain privileged 
information or copyright material. If you are not an intended recipient, you 
should not read, copy, use or disclose the contents without authorisation as 
we request you contact us as once by return email. Please then delete the 
email and any attachments from your system.  We do not accept liability in 
connection with computer viruses, data corruption, delay, interruption, 
unauthorised access or unauthorised amendment. Any views expressed in this 
email and any attachments do not necessarily reflect the views of the 
company.
********************************************************************************


Re: mod_perl, shared memory and solaris

Posted by Carl Johnstone <mo...@fadetoblack.demon.co.uk>.
>>>>>
Any advice on memory use on Solaris is appreciated
<<<<<

Take a look at:

http://people.ee.ethz.ch/~oetiker/tobjour/2003-02-12-09-00-f-1.html

There's some useful information, including a chunk covering what you're 
after. Specifically try:

   pmap -x  PID

the private/anon column shows the amount of memory exclusive to the process.

Carl 


Re: mod_perl, shared memory and solaris

Posted by Frank Wiles <fr...@wiles.org>.
On Tue, 20 Sep 2005 10:13:39 +1200
dan.horne@apn.co.nz wrote:

> Hi
> 
> I've set up mod_perl v1.29 with apache 1.3.33 and I'm trying to
> maximise  the amount of memory shared between the httpd processes. 
> 
> I've created a startup.pl file and have entered all modules I use, and
> 
> have loaded the specific the DB driver etc.  I'm not using CGI, and
> only  one custom module is installed (which in turn uses the CPAN
> modules in the  startup file)
> 
> The problem I have is the top and ps commands don't give the shared
> memory  size. However, if I issue
> 
> ipcs -m
> 
> there are no shared memory segments. Should mod_perl make use of them?
> 
> Likewise, when I issue
> 
> /usr/proc/bin/pmap <apache proc_id> | grep "shmid"
> 
> no shared memory is listed.
> 
> The problem is, each http process seems to be about 18M. This isn't a
> big  deal if most of the memory (even half)  is shared, but it doesn't
> seem to  be as far as I can tell.
> 
> Any advice on memory use on Solaris is appreciated

  Hi Dan, 

  When talking about mod_perl and "sharing" we aren't talking about 
  SysV shared memory that you'd use in IPC.  

  By pre-loading all of your modules each Apache child shares all of
  the common code and only has one copy of each module in RAM.  This
  way the only RAM consumed by each Apache child is only the child
  specific memory, such as per request information, temporary 
  variables, etc. 

  Hope this helps. 

 ---------------------------------
   Frank Wiles <fr...@wiles.org>
   http://www.wiles.org
 ---------------------------------