Hi there SharePoint community,

This time let's talk about a particular topic that in my experience is not well known and SharePoint Administrators or SharePoint tem in general is not aware of the issues they can face. I was working recently in a SharePoint RAP where a customer wanted to discuss a performance issues, because of a specific business needs this customer deployed SharePoint using Collaboration site definitios rather than Publishing ones even though their SharePoint is used for a public Portal only, at the end of the day this is not the problem, they were suffering for 2 days because of the main SharePoint page took around 30 seconds to load, once the page was loaded by the explorer the navigation were fast, so this did not match with the first 30 seconds to load.

The entire SharePoint farm is virtual and even a capacity plan was not performed or SharePoint virtualization guidelines were not followed, the farm is composed by 2 WFE and 1 APP server and database server, each SharePoint server has 2 CPU's and 16 GB of RAM, public portal has only plain information and some videos which use external streaming applications, is not workload for SharePoint, the point is there was not a reason of the slow performance.

We have to remember that SharePoint since WSS 3.0 version has 3 types of cache, page output cache profiles, object cache and BLOB (Binary Large Objects), each one of them with a specific task:

BLOB cache

          SharePoint Server 2010 provides a disk-based cache that stores files that are used by Web pages to help them load quickly in the browser, and reduces the load on the database server when it uses those files. These files are known as binary large objects (BLOBs), and the cache is known as the BLOB cache. The BLOB cache is stored directly on the hard disk drive of a front-end Web server computer. The first time that a Web page is called, these files are copied from the database to the cache on the server hard disk drive, and all subsequent requests for those files are then served from the hard disk drive cache of the server. By default, the BLOB cache is OFF and must be enabled to use the functionality it provides. When you enable the BLOB cache on your front-end Web server, you reduce the load on the SharePoint Server 2010 database server created by read requests from Web browsers.

 

Note: BLOB cache is not mandatory to have it configured, only if multimedia objects are present in sites. If we have a SharePoint farm with more than 1 WFE server it is recommended that BLOB cache is stored in a logical drive different than C drive and every WFE has the same logical unit.

Page output cache profiles

         The page output cache stores the rendered output of a page. It also stores different versions of the cached page, based on the permissions of the users who are requesting the page. Page output cache settings can be configured at the site collection level, at the site level, and for page layouts. By default, the page output cache is turned OFF.

The page output cache uses cache profiles that specify how long items should be held in the cache. You can specify different cache profiles to be used for anonymous and authenticated users, which optimizes the use of the cache based on the authentication methods that are allowed on the site.


Finally:

Object cache

         The object cache reduces the amount of traffic between the Web server and the SQL database by storing objects—such as lists and libraries, site settings, and page layouts—in memory on the front-end Web server computer. As a result, the pages that require these items are able to be rendered quickly, increasing the speed with which pages are delivered to the client browser. Object cache settings can be configured at the Web application level, and at the site collection level. By default, the object cache is ON at the site collection level.

You can optimize the object cache for a Web application by specifying the size of the object cache. Specifying a larger number can enhance performance for some large sites at the cost of memory on each front-end Web server. You can configure other settings for the object cache at site collection level.

Note: Object cache is only available in Publishing SharePoint templates or when publishing features are enabled in your sites, in the other hand object cache requires 2 user accounts:  The Portal Super User and Portal Super Reader accounts

Conclusion

After this brief summary, it is important to mention that object cache uses the site system account and NT Authority\Local Service account by default, but there are some known issues with this configuration, issues that this customer faced:
 
A) The first issue is that some items get checked out to System Account, so when a query that includes these items is made, the checked out version of the item is returned instead of the latest published version. This is a problem because it is not what a user would expect to have returned, so the cache has to make a second query to fetch the correct version of the file. This negatively affects server performance for every request that includes these items. The same problem would occur for any user who has items checked out, if that user’s account was set to be the Portal Super User account. This is why the accounts configured to be the Portal Super User and the Portal Super Reader should not be user accounts that are used to log into the site. This ensures that the user does not inadvertently check items out and cause problems with performance.
 
B) The default Portal Super Reader account is NT Authority\Local Service, which is not correctly resolved in a claims authentication application. As a result, if the Portal Super Reader account is not explicitly configured for a claims authentication application, browsing to site collections under this application will result in an “Access Denied” error, even for the site administrator. This error will occur on any site that uses any feature that explicitly uses the object cache, such as the SharePoint Server Publishing Infrastructure, metadata navigation, the Content Query Web Part, or navigation.
Once the object cache was configure properly and user accounts were created and configured according to best practices the main portal page loaded in 3 seconds, some custom application are loaded for video streaming, this does not affect SharePoint since processing is being done externally.
Be carefull when configure SharePoint to use any type of cache and pay special attention to the main objective for your SharePoint Site Collections or Sites in order to use the correct templates and/or cache configuration.
To get more information about SharePoint cache please check:
Cache settings operations (SharePoint Server 2010) - http://technet.microsoft.com/en-us/library/cc261797.aspx
Configure object cache user accounts - http://technet.microsoft.com/en-us/library/ff758656.aspx
Untile next time