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 6768 1 S < 0.0 7.5
> 6:57 /usr/local/apache/bin/httpd
> 9665 nobody -1 -1 35728 34M 6240 1 S < 0.0 6.9
> 5:57 /usr/local/apache/bin/httpd
> 9663 nobody -1 -1 35312 34M 6412 1 S < 0.0 6.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)
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.
- Bill