Re: Accuratly mesure Beagle's Memory Usage


On 11/16/07, Kevin Kubasik <kevin kubasik net> wrote:
> Hey, I'm doing some quick number crunching and was looking for a good
> way to get accurate numbers on Beagles memory footprint, I know just
> ps or top isn't very accurate, are the numbers reported by mono
> internally reliable (what we print when run in debug memory mode)?

If you're looking for our managed memory usage, heap-buddy (a
summarizing profiler) and heap-shot (a snapshotting profiler) are the
best to use.  They both give very accurate accounting for our managed

If you're looking for overall system usage, I suggest using smaps
and/or exmap to take a look at how much memory is actually being used
(as opposed to which pages are shared by other processes, etc.).

*Never* use VMSize as an indicator, it is mostly worthless because it
includes the memory mapped into the process (even if it is never
used).  If I mmap() in a 2 gigabyte file, for example, my VMSize will
be over 2 GB, but that doesn't mean that any of it will actually be in

RSS is memory that is "in use" but it doesn't take into account memory
shared between processes.  For example, if you were running Beagle and
Tomboy, a large amount of the class libraries between the two would
likely be shared.

RSS - shared is a reasonable approximation of the memory that is
allocated by that process.  Exmap installs a kernel module which is
able to track the sharing of memory at the page level.

Lastly, there are some environment variables you can pass to Mono to
get, for example, detailed garbage collection statistics.  Search the
Mono wiki for that info.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]