I'm trying to push a project to production, and am trying to optimize
the server.

I'm using Apache2::Status. So far, it does what it claims.

But I somehow have 50mb apache processes, and am trying to track down
the bloat. I expected to have a process 1/10 that size. The code
base for my own libraries is about 900k- that includes all my page
generation stuff and Petal templates which I precompile.

I'm wondering a few things:

1) has anyone written something that recursively goes through all the
modules and aggregates the memory sizes for output?
I'm hoping for something that can give me a view of all the memory
used and where, without having to click myself

2) I see process grow without stopping, even with reload. i assume
this is from the caveat in "PerlSetVar StatusTerseSizeMainSummary On" ?

3) memory usage on the following 'pages' doesn't work:
/ - perl-status/?status_memory_usage
/main (symdump)- perl-status/main?noh_b_package_size

i'm sure that some of this is from unnecessary includes.

i did some tests using prefork with 1 child max, so i could see the
code caching optimization

w/nothing loaded

$ ps aux | grep httpd
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME
COMMAND
root 10386 0.0 0.4 51648 5788 ?? Ss 4:38PM
0:00.14 /usr/local/apache2/bin/httpd -k start
nobody 10387 0.0 0.0 50700 720 ?? S 4:38PM
0:00.00 /usr/local/apache2/bin/httpd -k start

after the first request (just of the perl-status page) 720 ram jumps
to 2616


then i load my libraries, dependencies

$ ps aux | grep httpd
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME
COMMAND
root 10347 0.0 2.0 85040 31660 ?? Ss 4:36PM
0:02.40 /usr/local/apache2/bin/httpd -k start
nobody 10350 0.0 0.2 78384 2716 ?? S 4:36PM
0:00.02 /usr/local/apache2/bin/httpd -k start

after the first request (just of the perl-status page) 2716mb ram
jumps to 10820 , making a request to any of my pages, the children
jump to RSS 17000

my dev box is osx- and I don't know if I'll be able to get gTop
installed to work with modperl. (i installed it with darwin ports ,
which installed a ton of crap. still trying to figure it out )

also i noticed that the parent memory, as time progresses , does this
VSZ RSS
85040 31520
85040 28132

shoudn't the RSS stay the same?

based on what i've written so far, can anyone give me some pointers?
something just doesn't seem right.

i'll grudgingly accept 30mb for a parent process -- but i'm making
heavy use of precompiled code. or at least think i am-- things seem
to have been loaded via startup.pl.

on that note though- does anyone have a recipe for traversing a given
directory and including all .pm files within it? i could alter my
TAL caching script to do it, but that would likely save me 10 minutes
on an already frustrating day.

thanks again in advance





// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -