Performance Monitor is a tool that is native to all variants of the Windows OS. Think of it as Task Manager on steroids. Just do a search for "perfmon", and you'll see it in the start window.
Using Performance Monitor
In the tree view on the left side of the screen click on "Performance Monitor" inside the "Monitoring Tools" folder. Here you can see real time data collection. By default it shows processing percentage. Right click this counter and click "Remove All Counters". Now, right click and select "Add Counters". Expand the "Process" category in the list box on the left, and choose "Private Bytes" Private Bytes is the amount of memory a process has allocated to it exclusively. In the second list box, select the process that represents the IIS worker process for the web application you are monitoring. The process is normally named w3wp. Keep in mind that there is a separate worker process for each application pool. Application pools can be shared among more that just one web application so you need to dig around in IIS to determine what you are looking for. If more that one app pool is running, you will see multiple w3wp instances. You can deduce which worker process is the one you want by comparing the memory usage in peformance monitor with the memory usage in IIS (select the server, then choose worker processes). I usually just end up selecting them all. Select "Add" and then "OK". Now you'll see the memory usage scrolling across the screen. However, since the usage is in bytes, and the y axis only goes up to 100, the line is just a straight line along the top of the graph. So, you'll need to scale down the numbers by right clicking each counter, and choosing "Properties". I have found a scale of 0.0000001 works good for this.
This only shows you data from the last minute or so. If you want to record usage from a longer period of time, you need to set up a "Data Collector Set". Expand "Data Collector Sets" in the tree view and right click the "User Defined" folder. Choose "New" and then "Data Collector Set" from the menu. Choose a basic template. Click on your new data collector set, and then double click on Performance Counter. Remove the counter that's there, and add the counters like you did above. Then set the sample interval. Right click the collector set and click properties and select the stop condition tab. Here you can set how long you want the collector to run. After setting all of this up, you can right click the collector and choose start. When it completes there will be a report in the reports folder.
No comments:
Post a Comment