| Subcribe via RSS

SharePoint Performance Checklist

September 7th, 2009 Posted in SharePoint

I’ve made lots of performance tunings during the last weeks and figured out that this can be a weird, long and complex task. On the one hand there are many built-in mechanism that can be configured and on the other hand there are lots of things you shound pay attention to when you develop your own web parts.

I’ve assmebled a little checklist you can walk through. I do not cover everything in detail but I’ve linked a couple of online posts and articles where you can start reading if you need more information on specific tasks.


Limit global Navigation & Permission breaks

If you have a collaboration site collection with individual permissions on each website or at list level then your navigation controls can slow down your sharepoint performance. SharePoint has to check your permissions for each item listed in the navigation controls what can be very time consuming. Because the global navigation is placed on every web site this impacts your whole site collection.

So if you have lots of permission breaks either limit the items displayed by the navigation controls and eleminate the default navigation treeview or implement your custom navigation provider using caching mechanisms and activate object caching.


Activate Blob Cache

The blob cache can be used to reduce the round trips between the WFE and the database server. If activated, all images stored within the site collection are cached on the hard disk of the WFE server. The blob cache can only be configured within the web.config of each web application.

Another big point of the blob cache ist the max-age attribute. It tells the browser not to request that image again for a given period of time. So you can use this attribute to reduce the requests between the browser and the WFE.

In the web.config file search for the <BlobCache …> section and set it to the following example:

<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" max-age="86400" enabled="true"/>

Now the cache is enabled and the files with the defined extensions are stored on WFE hard disk and the browser will not rerequest them for about 24 hours.

Selvagan posted a great article about the blob cache.

Tip: Store the cached files on a different hard disk as the web server to maximize the I/O throughput.

If you want to clear the blob cache on all WFE servers at once you need this codeplex solution.


Activate Output Cache

Output caching enables SharePoint to cache HTML markup of Web Parts or complete web pages. This makes sense most if you have a publishing page with anonymous access enabled. If you enable output caching on a site with authenticated users the output is cached for each user individually. This can become a memory issue.

Read more in the output caching secion of this MSDN article.


Activate Object Cache

SharePoint can cache objects like navigation elements and Cross-list query results. This should be activated on every SharePoint site. Microsoft has posted an article on how to activate and configure the object cache.


Indexing of columns

If you have large list views that are ordered or filtered you should place an index on those list columns where you set the filter on. An index can also increase the performance if you have a lookup field with many items in the lookup list.

Have a look at this Microsoft article on managing lists and libraries with many items and read the Microsoft White Paper: Working with large lists in Office SharePoint Server 2007.

Andreas Grabner wrote an article on how list column indexing works under the hood.


Be careful using the Content Query Web Part

If you use the Content Query Web Part to collect data from large lists or from your whole site collection you have to be knowing what’s happening in detail. You can increase CQWP performance using object cache and implementing your own CQWP. Ranjan Banerji wrote a great article on content query web part performance.


Use Warmup Timer Job

If you restart your server for maintenance or reset your IIS during a solution deployment all your web applications are shut down. Now, when the first user requests your website it takes up to a couple of minutes until the web application is reloaded and caches are filled. It would be nice if theres someone who takes a browser and calls every website before the first user does.

Joel Oleson wrote a post about a script that acts like that “someone” and triggers all websites of your site.

Andrew Connell write a post on how to implement the script as a timer job. You can download the timer job from msdn.


Watch your crawler

A misconfigured crawler can push your server cpu usage to 100%  from dusk till dawn. This can happen very quickly if you have an intranet website with lots of members creating new content and uploading tons of documents. Then the crawl duration is growing very quickly.

For example if you scheduled your crawler to run every 30 minutes and the crawl duration is longer than 30 minutes your server is crawling all the day. So you should check the crawl log periodically. If your crawl duration becomes too long you have to reconfigure your crawl schedule and crawl your content only once every two hours. If your search index may not be out of date for more than 30 minuts you have to add more search server to the farm.

Patrick Thisseghem wrote a great book about the SharePoint search and indexing engine: Inside the Index and Search Engines: Microsoft Office SharePoint Server 2007


Use tools to measure site request performance

Use tools like Fiddler, YSlow and Firebug to find out whats going on between the browser and your SharePoint server.  Find out if there are long waiting times, too many server requests or ineffective java scripts slowing down your website. Use these tools to check if blob caching works.

SharePoint works best if used with Microsoft Internet Explorer but I love the Firefox plugins YSlow and Firebug because they are very easy to use, detailed and give lots of hints if your performance is bad.


Measure your Web Part performance

Every custom web part can slow down your SharePoint website. The SharePoint API often performes not as expected and this can impact your Web Part performance. Use the Stopwatch class in your web part to measure critical code parts and write the results into the web part. Implement a Web Part property to switch on/off the stopwatch results.

There are developers out there saying perfomance measures should be part of productive code and rather be made using unit tests or console applications. Those developers are basically right but might have never been to the wild west of SharePoint. A Web Part lives within a SharePoint site and no unit test or console application can simulate that so you have to use your productive web part to make performance tests.

2 Responses to “SharePoint Performance Checklist”

  1. Avery Kerkvliet Says:

    hey there and thankyou for the info – I have definately picked up anything new from right here. I did on the other hand experience some technical issues with this particular web page, because I had to reload the web site numerous occasions before I could get it to load correctly. I had been questioning if your hosting is OK? Not that I’m complaining, but sluggish loading instances instances will very generally impact your placement in google and can damage your quality score if promoting with Adwords. Anyway I’m adding this RSS to my e mail and can look out for a lot more of your helpful content material. Please update this once again quickly….

  2. Tom Molskow Says:

    Hey Alexander,

    Great article! I have researched all this information before, finding information here-there-everywhere, but this is the best organized summary I have read on the web so far.


    Tom Molskow

Leave a Reply