Profiling an app

F

Frank Rizzo

I am trying to profile the memory usage of an application. In Task
Manager, I can add Virtual Memory Usage (VM Usage). I am confused by
this metric. Usually it is close to the Mem Usage value. However, on
my laptop I turned off Virtual memory (e.g. I have no paging file),
since I have more than enough RAM. So one would think that VM Size
column in the Task Manager would be all zeroes. It is not. Does VM
Size mean something else?

Thanks.
 
W

Willy Denoyette [MVP]

|I am trying to profile the memory usage of an application. In Task
| Manager, I can add Virtual Memory Usage (VM Usage). I am confused by
| this metric. Usually it is close to the Mem Usage value. However, on
| my laptop I turned off Virtual memory (e.g. I have no paging file),
| since I have more than enough RAM. So one would think that VM Size
| column in the Task Manager would be all zeroes. It is not. Does VM
| Size mean something else?
|
| Thanks.

VM size in taskman is the "private bytes" performance counter.

Process VM size or "Private bytes" is the amount of bytes allocated in the
paging file to hold the contents of the private memory in the event it is
swapped out. Not having a paging file doesn't mean you don't commit private
memory though (f.i the GC heap is private bytes just like JIT'd code).
Note that the "private bytes" counter somewhat overstates the real amount of
physical memory allocated. If you want to know the resident physical memory
that has been allocated to hold these private bytes, you have to run
vadump.exe (from the platform sdk), but beware, this one can understate the
amount of memory allocated in the event of paging (provided you have a
paging file).
Note that turning of paging is not a good idea, you might overstate the
amount of RAM you have and understate the amount needed.

Willy.
 

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

Top