- Windows Performance Monitor
I tried visual studio ultimate performance and diagnostics, and ran the app and put the load, but when it compiled the report it showed only the CPU Utlization over time and NOT net memory allocation, which is what i want…
This guy here refers to https://msdn.microsoft.com/en-us/library/dd264934.aspx according to which:
To collect .NET memory data
- In Performance Explorer, right-click the performance session, and then click Properties.
- FIRST, CHANGE THE PROFILING COLLECTION TYPE TO “INSTRUMENTATION”
- On the Performance SessionProperty Pages dialog box, click the General tab, and select the Collect .NET object allocation information check box.
- To collect .NET object lifetime data, select the Also collect .NET object lifetime information check box.
but this still doesn’t show me the trend..what i want is the private byte performance counter data for this app pool. But going to perfmon and setting things up is a hassle.
Hence i’m trying to do it from VS only.
Finally found this:
|On the Windows Counters page, specify one or more operating system performance counters to add to the profiling data as marks.|
To collect Windows counter data
- In Performance Explorer, right-click the session for which you want to configure Windows counters and select Properties.
- In the Property Pages, click Windows Counters.
- Select the Collect Windows Counters check box.
- In the Collection interval (msecs) text box, type a time interval.
- Select a category from the Counter Category drop-down list.
- Select an instance from the Instance drop-down list.
- Select the counters you want to use when you profile your application.
- Click Apply.
i’ve set these counters specifically to detect memory leaks: http://www.iis.net/learn/troubleshoot/performance-issues/troubleshooting-native-memory-leak-in-an-iis-7x-application-pool
his troubleshooter will help you to identify the cause of native memory leak in an IIS application pool. It’s important to keep in mind that it is normal for high memory allocation as a web application serves requests. However, if you consistently see both Process\Private Bytes and Process\Virtual Bytes are increasing or Process\Private Bytes and Process\Working Set are increasing and Memory\Available Bytes is decreasing, the memory leak will occur and it may cause an out-of-memory exception.
turns out that you cannot plot chart for the data collected, so i’m exporting it to csv and then plotting on excel.Steps:
1. Once profiling is stopped, change current view to “Marks”
2. Then export data as csv ( clk on export report data filter and then select marks)
3. Open it in excel and plot the desired chart
- On analysis i found that the private bytes is not really the Total Memory allocated to the process. This thing confirms that: http://stackoverflow.com/questions/1984186/what-is-private-bytes-virtual-bytes-working-set