At the very heart of SharePoint are lists.
Just about everything in SharePoint is a list. It can be stated that
SharePoint content is list driven.
One of the shortcomings of the previous version of
SharePoint was that performance began to degrade if a list had more than
2000 items. This doesn't mean if a list had 2001 items, the performance
degradation was noticeable. A SharePoint list could have millions of
records. Let's break down exactly what happens when a user requests
information from a list.
A user clicks on a link to see the items in a list.
It invokes a query back to SQL to pull those items and present them. The
query looks at how many columns are on that list and does a "select
all" operation. The more columns in a list, the more data that is
returned, and the longer it takes to select all of that data because it
is number of rows multiplied by number of columns.
Resource throttling is a set of configuration items
built into the software to address the issue of performance of large
lists and resource contention. The goal is to prevent servers from
running out of resources. Setting these parameters will offer better
fidelity to your SharePoint installation.
In this recipe we will cover the different parameters and how to configure them.
Getting ready
You must have farm-level administrative permissions to the Central Administration site.
How to do it...
Open up the SharePoint 2010 Central Administration website.
Click Application Management.
Under the Web Applications section, click Manage web applications.
Select a web application (the ribbon will light up).
Click the General Settings dropdown on the ribbon:
Click the Resource Throttling option from the drop-down list. The resulting form has the following components to be configured:
List View Threshold: Defaults to 5000.
Object Model Override — Yes/No radio buttons. The default value is Yes.
List View Threshold for Auditors and Administrators: Defaults to 20000.
List View Lookup threshold: Defaults to 6.
Daily Time Window for Large Queries: Check this option which, when enabled, allows setting of a start time and a maximum duration.
List Unique Permissions Threshold: Defaults to 50000.
Backward-Compatible Event Handlers: On/Off radio buttons. Defaults to Off.
HTTP Request Monitoring and Throttling: On/Off radio buttons. Defaults to On.
Change Log: Defaults to 60 days after which log entries are deleted. Can be set to Never.
After making changes to any component(s), click OK.
How it works...
Resource throttling is performed at the web
application level. The configuration applies to all site collections and
sites under the web application. Throttling can be completely disabled
in Central Administration for a web application, as seen in the
parameter HTTP Request Monitoring and Throttling.
By default, resource throttling checking is on, which
enables a timer job that runs every five seconds. This job checks the
state of server resources against the performance counters. If that
check comes back with a failure three times in a row, a throttling state
will be enabled. The server will stay in this state until a successful
check is performed.
While in a throttled state, users may see a 503
Server is busy screen. Users will need to refresh their screen to see if
their request has completed.
The resources that are checked by default are Server CPU, Memory, Request in Queue, and Request Wait Time.
The List View Threshold is the number of items that can be returned to a user. By default, this is 5000 items.
The List View threshold for Auditors and Administrators is the number of items that can be returned to an administrator or power user. The default is 20000 items.
List View Loopup Threshold is the maximum amount of fields with the type called Lookup in a list. Lookups are database intensive. The default is 8.
List Unique Permissions Threshold is
when inheritance is broken on a list and granular permissions are
involved. Item-level permissions have potentially severe consequences on
database performance and must be considered and planned carefully.
There's more...
PowerShell can be used to view, set, and enable/disable resource throttling.
PowerShell: View list of Performance Counters&;
Get-SPWebApplicationHttpThrottlingMonitor-identity <identity>
PowerShell: Set Performance Counters&;&;
Set-SPWebApplicationHttpThrottlingMonitor-identity <identity> -Category <category> -Counter <counter> -Instance
<instance> -MaxThreshold <maxthreshold> -MinThreshold <minthreshold>
PowerShell: Disable Resource Throttling&;
Disable- SPWebApplicationHttpThrottlingMonitor-identity <identity>
PowerShell: Enable Resource Throttling&;&;
Enable- SPWebApplicationHttpThrottlingMonitor-identity <identity>
More info
Server CPU, Memory, Request in Queue, and Request
Wait Time are monitored by default. A new performance counter has to be
added via the object model. The counters that are used can be obtained
via the Performance Monitor application on the server.
Here is an example of how to configure the Processor Time:
$uri = new-object System.Uri(http://"yourwebsite")
$webApp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($uri)
$httpthrottlesettings = $webApp.HttpThrottleSettings
$httpthrottlesettings.AddPerformanceMonitor("Processor", "% Processor Time", "_Total", 70,0)
$httpthrottlesettings.Update()