> My main problem is: Memory Usage.

> Currently, the apache processes take (each) about 150 MB memory,
> what's quite a lot. Now, i've been wondering which module and why it
> takes that much memory at all.

Check out this thread:
http://aspn.activestate.com/ASPN/Mail/Message/modperl/3173671

> My understanding (perl memory handling, garbage collection) is, that
> objects are destroyed as soon as functions are finished. How about
> this in mod_perl? It seems as if a lot of unnecessary things are
> cached. I can't just measure how much memory is used and restart the
> processes using several modules, since that would definitely result in
> a runtime performance problem.

perl garbage collects when the variable goes out of scope, but it
doesn't return the memory to the system.  See
http://perldoc.perl.org/perlfaq3.html#How-can-I-free-an-array-or-hash-so-my-program-shrinks%3f


in simple terms: mod_perl destroys the objects, but it holds onto the
memory for the lifetime of the child.  if a single var ups your
child's memory by 5mb, that 5mb will stay reserved for the child
until it dies.

This is correct.  I've argued that this is a good thing:
http://foobarbazbax.livejournal.com/4953.html

> Do you have any advice, how to measure functions and / data which is
> kept? Or generally what takes that much memory? I definitely don't
> need to keep this data, since it would always change (per-request).

See Apache::LogMemoryUsage, which isn't on CPAN, but I pasted in that
same thread I referenced above:
http://aspn.activestate.com/ASPN/Mail/Message/modperl/3175357

Best of Luck,
Jay

Reply via email to