memory profiling

  • Thread starter Jaap Karssenberg
  • Start date
J

Jaap Karssenberg

Does anyone know of a simple way to see where the memory goes in a large
perl application ?
 
C

ctcgag

Jaap Karssenberg said:
Does anyone know of a simple way to see where the memory goes in a large
perl application ?

Depends on how modular the application is.

Xho
 
J

Jaap Karssenberg

On 10 Feb 2004 01:18:10 GMT (e-mail address removed) wrote:
: > Does anyone know of a simple way to see where the memory goes in a
: > large perl application ?
:
: Depends on how modular the application is.

It's kinda modular, if can figure out the memory usage per module that
would make a good start for further analysis. So what do you suggest ?
 
C

ctcgag

Jaap Karssenberg said:
On 10 Feb 2004 01:18:10 GMT (e-mail address removed) wrote:
: > Does anyone know of a simple way to see where the memory goes in a
: > large perl application ?
:
: Depends on how modular the application is.

It's kinda modular, if can figure out the memory usage per module that
would make a good start for further analysis. So what do you suggest ?

When I have no idea where the memory could be going, usually I already have
a driver for each module, so I just rig it up to run a psuedo-workload on
each module separately and check the mem usage using "top" or whatever.

But I am proud (or perhaps ashamed) to say I've used Acme::Abuse to run
each module (in turn) in a separate interpreter, and just compared the
sizes of the respective processes, when I wasn't able to readily make a
realistic driver.

But the thing I most often use is just Data::Dumper, as usually there are
only a handful of suspects as to where the memory could be going.
warn "suspect1 is ",length Dumper(\%suspect1); # give rough estimate of
size



Xho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top