Reputation: 971
I have a website in IIS 7 and I need to monitor the memory usage of that website when there are concurrent requests for it. Can you please let me know how can i do this? Is there any tool available or is that possible to use any feature of IIS?
Upvotes: 29
Views: 58078
Reputation: 4114
To get the 'Managed Memory Used' counter to work on my server I found I had to make an additional change:
The aspnet.config
config file (generally located at C:\Windows\Microsoft.NET\Framework\v4.0.30319
, YMMV) needs to be modified to include the appDomainResourceMonitoring
element (although there will probably be other stuff there as well):
<configuration>
<runtime>
<appDomainResourceMonitoring enabled="true"/>
</runtime>
</configuration>
There is no need to restart IIS, but you do need to recycle application pool you want to monitor.
See these two blog posts for more info:
Performance Monitoring of individual Asp.net Application in Asp.net 4.0
Asp.Net 4.0: An Overview-Part-III
Upvotes: 17
Reputation: 743
Windows Performance Monitor should be able to get you pretty close to what you want. There are literally hundreds of metrics in there to use.
To access it, simply do Start -> Run -> perfmon From there, select 'Performance Monitor' in the left pane, and click the '+' button to begin adding in counters.
If its an ASP.NET based web site, you can select one of the 'ASP.NET Apps' counter categories (may have more than 1 if you have more than 1 version of ASP.NET installed) and click on the 'Managed Memory Used' counter. In the list below that, all actibe websites are displayed and you can add the counter for that. You can watch the counter in realtime or elect to save the data to disk or a DB for later analysis.
There is a W3SVC_W3WP counter category that allows you to examine metrics for specific app pools but nothing (that I can see) that will offer memory used per app pool.
Depending on what you are trying to determine though, you may be able to find a bunch of metrics to aid in your analysis.
Upvotes: 36