Re: horrible memory consumption

2000-01-26 Thread Doug MacEachern

have a look at the Apache::Status in the cvs tree, there are hooks into
B::TerseSize which is used to measure Perl memory usage.

On Wed, 19 Jan 2000, Jason Terry wrote:

 Is there a way I can tell where my memory usage is going in an Apache child?
 
 I have a server that starts with acceptable numbers, but after a while it
 turns into this
 
 Server Version: Apache/1.3.9 (Unix) mod_perl/1.21 PHP/3.0.12 mod_ssl/2.4.4
 OpenSSL/0.9.4
 Redhat Linux: 2.2.13
 
 PID   USER PRI  NI   SIZE   RSS SHARE LC STAT %CPU %MEM   TIME  COMMAND
 9666 nobody-1-1   38900  37M  67681S0.07.5
 6:57/usr/local/apache/bin/httpd
 9665 nobody-1-1   35728  34M  62401S0.06.9
 5:57/usr/local/apache/bin/httpd
 9663 nobody-1-1   35312  34M  64121S0.06.8
 6:11/usr/local/apache/bin/httpd
 
 Now I examined these children using /server-status and they had all recieved
 more than 7000 accesses for each child.
 
 Is there a way I can find out where all this RAM is being used.  Or does
 anyone have any suggestions (besides limiting the MaxRequestsPerChild)
 



Re: horrible memory consumption

2000-01-20 Thread Vivek Khera

 "JT" == Jason Terry [EMAIL PROTECTED] writes:

JT Is there a way I can tell where my memory usage is going in an
JT Apache child?  I have a server that starts with acceptable
JT numbers, but after a while it turns into this

It would probably be best if you started by reading through the
performance tuning guide and Stas' mod_perl guide on how to reduce
memory consumption.  Basically, when you have complex mod_perl
operations going in, you want to offload non-mod_perl related tasks
(images, static content) to other servers.



Re: horrible memory consumption

2000-01-20 Thread Stas Bekman

  Is there a way I can find out where all this RAM is being used.  Or does
  anyone have any suggestions (besides limiting the MaxRequestsPerChild)
 
If anyone knows how to figure out shared vs not shared memory in a 
 process on Linux, I'd be interested in that too...and it sounds like Jason
 could benefit from the info as well. I know that Apache::Gtop can be 
 used for mod_perl from reading The Guide (thanks Stas!) but I'm interested 
 in finding out these numbers for other non-mod_perl binaries too (such as
 an apache+mod_proxy binary). Also if anyone has any good pointers to info
 on dynamic linking and libraries (again, oriented somewhat towards Linux),
 I've yet to see anything that's explained things sufficiently to me yet. 
 Thanks.

GTop (not Apache::Gtop) is written by Doug, not me :) So the credits go to
Doug.

What you are talking about is Apache::VMonitor which shows you almost
everything the top(1) does and much more. You can monitor the
apache/mod_perl processes and any other non-mod_perl processes as well.

When you click on the process id you get lots of information about it,
including memory maps a sizes of the loaded libs. 

This all of course uses GTop, which in turn uses libgtop from the GNOME
project and lately reported to be ported to new platforms as well. 

Enjoy!

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com



horrible memory consumption

2000-01-19 Thread Jason Terry

Is there a way I can tell where my memory usage is going in an Apache child?

I have a server that starts with acceptable numbers, but after a while it
turns into this

Server Version: Apache/1.3.9 (Unix) mod_perl/1.21 PHP/3.0.12 mod_ssl/2.4.4
OpenSSL/0.9.4
Redhat Linux: 2.2.13

PID   USER PRI  NI   SIZE   RSS SHARE LC STAT %CPU %MEM   TIME  COMMAND
9666 nobody-1-1   38900  37M  67681S0.07.5
6:57/usr/local/apache/bin/httpd
9665 nobody-1-1   35728  34M  62401S0.06.9
5:57/usr/local/apache/bin/httpd
9663 nobody-1-1   35312  34M  64121S0.06.8
6:11/usr/local/apache/bin/httpd

Now I examined these children using /server-status and they had all recieved
more than 7000 accesses for each child.

Is there a way I can find out where all this RAM is being used.  Or does
anyone have any suggestions (besides limiting the MaxRequestsPerChild)



Re: horrible memory consumption

2000-01-19 Thread Cliff Rayman

check out the following sections in the guide:

http://perl.apache.org/guide/performance.html#Memory_leakage
http://perl.apache.org/guide/debug.html#How_can_I_find_if_my_mod_perl_sc
http://perl.apache.org/guide/performance.html#Limiting_the_resources_used_by_h
http://perl.apache.org/guide/performance.html#Tuning_the_Apache_s_configuratio

this ought to get you off to a good start.

cliff rayman
genwax.com



Jason Terry wrote:

 Is there a way I can tell where my memory usage is going in an Apache child?

 I have a server that starts with acceptable numbers, but after a while it
 turns into this

 Server Version: Apache/1.3.9 (Unix) mod_perl/1.21 PHP/3.0.12 mod_ssl/2.4.4
 OpenSSL/0.9.4
 Redhat Linux: 2.2.13

 PID   USER PRI  NI   SIZE   RSS SHARE LC STAT %CPU %MEM   TIME  COMMAND
 9666 nobody-1-1   38900  37M  67681S0.07.5
 6:57/usr/local/apache/bin/httpd
 9665 nobody-1-1   35728  34M  62401S0.06.9
 5:57/usr/local/apache/bin/httpd
 9663 nobody-1-1   35312  34M  64121S0.06.8
 6:11/usr/local/apache/bin/httpd

 Now I examined these children using /server-status and they had all recieved
 more than 7000 accesses for each child.

 Is there a way I can find out where all this RAM is being used.  Or does
 anyone have any suggestions (besides limiting the MaxRequestsPerChild)