Measuring the Output Cache on SharePoint 2010

Output cache is a very interesting featuere on IIS, ASP.NET and also on SharePoint 2010. It helps a lot to reduce the processing time of the requests on the server and improves the number of requests your servers can serve.

Last week I wrote an article about output cache configuration, now it is time to talk about how to check if the cache is working and how it is behaving.

The out of the box Windows Performance Monitor is a tool we can use to monitor the output cache. This monitoring needs to be done on all web front end (WFE) servers because each WFE server will have its own instances of the output cache. Each web application will have one instance of the output cache.
To launch the Performance Monitor, go to the Administrative Tools menu and click on Performance Monitor. Once the tool is loaded it will display the performance counter for total CPU time by default.

Click on the green cross to selected which performance counters to add.

Go to the ASP.NET Applications category, select the counter you need and choose the IIS site for the web application you will monitor.

The output cache counters are:

Output cache entries: current number of items on the cache. It will increase every time a new page is requested and the cache doesn’t have a copy of it, so the page will get processed and cached.

Output cache hit ratio: the percentage of hits served by the cache instead of having IIS and SharePoint to process the page.

Output cache hits: number of hits server by the cache instead of having IIS and SharePoint to process the page.

Output cache misses: number of hits processed by IIS and SharePoint.

Output cache trims:

Output cache turnover rate: number of additions and removals from the cache per second. Indicates how the cache is being used and if it is effective. If it has a high turnover the cache is not being used.


It is a good idea to adjust the scale for the performance counters. They will be added to the UI in a 0.1 scale. Change it to 1.0 in order to have a better view of the variation for the values.

After you have all the counters configured you can starting testing hitting parts of the site and see how the output will behave and also the response on the browser. For the first time you request a page it should take longer to return to the browser and on the monitoring you should see a new item being added to the cache. On the next requests for the same page, it should load faster and the number of cache hits and the hits ratio should be increased.

In order to run a monitoring session and save the data you need to Data Collector Set. This is a good article on how to do it:

Create a Data Collector Set to Monitor Performance Counters

See you,

Amadeu.