how to compute how much memory a process is using?

1

I would like to know, how much cumulative memory a process is using?

I am analyzing my system's performance during a large copy operation. In that, I am targeting few processes.

I want to calculate how much memory they use during that time and if some process is using significant memory, I wanted to dig into it (any memory leak or piece of code which is causing memory overhead).

I have tried using xperf commands.

In xperf command, I have used following kernel flags

->MEMORY+MEMINFO+MEMINFO_WS+HARD_FAULTS+VIRT_ALLOC+VAMAP+FOOTPRINT+REFSET

& stackwalk flags

->PageAccess+PageAccessEx+PageRelease+PageRangeAccess+PageRangeRelease+VirtualAlloc+VirtualFree+HardFault+HeapCreate+HeapFree+HeapAlloc+HeapDestroy+HeapRealloc+PagefileMappedSectionCreate+PagefileMappedSectionDelete

In the resulted etl, I can see following tabs in left pane under memory. Memory utilization: this is of no use because this does not contain any process related data.

Hard faults: Page faults by process Virtual alloc commit life times: Outstanding commit by process Pool Graphs: Paged data and Non-paged data Resident Set:

  1. Default
  2. Memory Pressure
  3. Physical Memory Pressure
  4. Process Private Working Set

Please enlighten me about which tabs/parameters to consider for memory usage. How do I use this data to conclude about memory usage\memory leaks\ API name that is causing higher memory utilization by loading symbols ?

Mr_Aj

Posted 2018-06-01T10:59:02.097

Reputation: 11

@magicandre1981 – Mr_Aj – 2018-06-01T11:10:16.027

use wpr.exe -start ReferenceSet -filemode && timeout 3 && wpr.exe -stop C:\HighMemoryUsage.etl. Drag & drop Resident Graph to analyzes pane to see the usage

– magicandre1981 – 2018-06-01T14:15:26.247

@magicandre1981 Sorry But this command is giving me error. "The system cannot find the file specified. Error code: 0x80070002". PS. I am using windows 7. – Mr_Aj – 2018-06-04T11:13:37.507

@magicandre1981 Can you please check above command once again. Because you wrote "Reference Set" in command and the link is for Resident Set analysis. And I think these two are quite different. – Mr_Aj – 2018-06-04T11:20:37.803

ReferenceSet works since Windows 8. Change command to ResidentSet. – magicandre1981 – 2018-06-04T14:53:57.913

@magicandre1981 Resident is working on windows 7. Now I can see Resident Set tab in left pane under Memory tab. – Mr_Aj – 2018-06-05T11:41:42.597

@magicandre1981 There are 4 appearances for this.

  1. Default
  2. Memory Pressure
  3. Physical Memory Pressure
  4. Process Private Working Set

Please enlighten me about which tabs/parameters to consider for memory usage. How do I use this data to conclude about memory usage\memory leaks\ API name that is causing higher memory utilization by loading symbols ? – Mr_Aj – 2018-06-05T11:48:22.583

No answers