Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
    
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 '12 at 15:57

1 Answer 1

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.

share|improve this answer
    
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 '12 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 '12 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 '12 at 14:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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