Recently I identified one memory leak on my webservice daemon (pure perl), and find resources to do it...
Check modules Find::Globals, Devel::Size. These modules work on solaris box, but on linux other modules area available with some libraries dependencies (Devel::Leak, Devel::LeakTrace), but I don't used it.

My compare with Devel::FindGlobals are text based:

use Devel::FindGlobals; open(D, "> $0." . time() ); print D "Globals: ", print_globals_sizes(), "\n"; close(D); __END__ Globals: Name of SCALAR variable Size Total Size ================================================================= $AutoLoader::AUTOLOAD 48 48 $AutoLoader::VERSION 29 29 $Benchmark::VERSION 20 20 $Benchmark::cache 16 16 ... cut ... $Carp::Verbose 16 16 $Class::ReturnValue::() 28 28 $Class::ReturnValue::VERSION 29 29 $Click21::Dist::VERSION 20 20 $Click21::Dominio 16 1625 $Click21::Dominio::VERSION 20 20 ... cut ...
After make two logs on pré-defined points, make a diff to identify size changes. .............

--
Marco Antonio
Rio-PM


In reply to Re: "benchmarking" memory usage by mda2
in thread "benchmarking" memory usage by salva

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.