2

I am asked to provide performance statistics for a program, one of them being memory consumption. I noticed that in perfmon or in .NET API there is apparently many variable related to memory usage, such as private bit, working set, page file, etc.

What are the difference, and which one should we use for measuring performance? If the vendor claims that the memory consumption of the program is improved in version X, what value can be used to validate this?

1
  • Companies like newrelic.com provide systems that can wrap your application with minimal setup and get a whole lot of metrics.
    – JF Dion
    May 10, 2012 at 15:57

1 Answer 1

2

First off, you need to know whether the application is written in a .NET managed language or not, if not, some memory profiling options won't be available to you.

Secondly, what is it you are being asked to do? Monitor the program externally? In another application? From PerfMon.exe? Or add memory profiling into the application code itself?

If you are monitoring it externally and just want to check it's memory footprint, try using permon.exe / "Performance Monitor", and adding a counter for Process->Private Bytes and attach it to the process you want information about.

If you are monitoring it internally, it depends on the language, etc. so it's hard for me to be specific, let me know and I'll add more if needed.

Edit: Well it seems a bit pointless to me writing an application when there is a perfectly good one already there for you to use in PerfMon? But as a reference for what is what, take a look at the following:

Otherwise just Google the name of the performance counter and I'm sure somewhere there will be a description of what it is / does.

3
  • Externally. I am supposed to run the program and collect its memory footprint by writing a testing program. Yes I notice I can get private bytes, but there are also Working set, page file, peak working set, and a bunch of other options related to memory usage. What are the difference and whihc one is appropriate?
    – Louis Rhys
    May 10, 2012 at 14:06
  • Take a look at my edit, but in short: Google it. The performance counters all log different things and I sure as hell am not going to go through all of them here. Private Bytes is (I expect) what you need to monitor however.
    – Siyfion
    May 10, 2012 at 14:18
  • If you are going to write your own program (in .NET?) then I'd take a look at these: msdn.microsoft.com/en-us/library/w8f5kw2e(v=vs.80).aspx codeproject.com/Articles/8590/…
    – Siyfion
    May 10, 2012 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.