The scope of this post is to help you to identify the root cause of a SharePoint performance issue.
We will implement collect performance counters, IIS logs and Failed Request Tracing from all the servers in the farm (SharePoint and SQL servers).
A. Performance Counters
Server type: Web Front End/Query
1. You need to allow Process ID value to be included as part of the process monitor data that is recorded. You can follow the steps from this article http://support.microsoft.com/kb/281884 The Process object in Performance Monitor can display Process IDs (PIDs)
2. Counters list that need to be implemented and collected on all the WFE servers
ASP.NET(*)*
ASP.NET v2.0.50727*
ASP.NET Apps v2.0.50727(*)*
.NET CLR Networking(*)*
.NET CLR Memory(*)*
.NET CLR Exception(*)*
.NET CLR Loading(*)*
.NET Data Provider for SqlServer(*)*
Processor(*)*
Process(*)*
LogicalDisk(*)*
Memory*
PhysicalDisk(*)*
SharePoint Publishing Cache(*)*
System*
Web Service(*)*
Web Service Cache*
You can add those counters manually or you can use logman create counter command line http://technet.microsoft.com/en-us/library/cc788038(WS.10).aspx
Example:
logman create counter Perf_Incident -s %COMPUTERNAME% -o C:PerfLogsPerf_Incident_%COMPUTERNAME%.blg -f bin -v mmddhhmm -cf WFECounterList.txt -si 00:00:05 -max 500 -u “domainuserid” *
Remark:
- WFECounterList.txt – is a txt file with all the counters that were listed on step 2
- You need administrative access to the server to execute this command
For SQL and Index server you can follow the same procedure but with different counters:
Server type: Index
ASP.NET(*)*
ASP.NET v2.0.50727*
ASP.NET Apps v2.0.50727(*)*
.NET CLR Networking(*)*
.NET CLR Memory(*)*
.NET CLR Exception(*)*
.NET CLR Loading(*)*
.NET Data Provider for SqlServer(*)*
Processor(*)*
Process(*)*
LogicalDisk(*)*
Memory*
PhysicalDisk(*)*
SharePoint Publishing Cache(*)*
Web Service(*)*
Web Service Cache*
SharePoint Search Archival Plugin(*)*
SharePoint Search Gatherer*
SharePoint Search Gatherer Project(*)*
SharePoint Search Indexer Catalogs(*)*
SharePoint Search Schema Plugin(*)*
System*
Server Type: SQL
.NET Data Provider for SqlServer(*)*
Processor(*)*
Process(*)*
LogicalDisk(*)*
Memory*
PhysicalDisk(*)*
Network Interface(*)*
NBT Connection(*)*
Server Work Queues(*)*
Server*
SQLServer:Access Methods*
SQLServer:Catalog Metadata(*)*
SQLServer:Exec Statistics(*)*
SQLServer:Wait Statistics(*)*
SQLServer:Broker Activation(*)*
SQLServer:Broker/DBM Transport*
SQLServer:Broker Statistics*
SQLServer:Transactions*
SQLAgent:JobSteps(*)*
SQLServer:Memory Manager*
SQLServer:Cursor Manager By Type(*)*
SQLServer:Plan Cache(*)*
SQLServer:SQL Statistics*
SQLServer:SQL Errors(*)*
SQLServer:Databases(*)*
SQLServer:Locks(*)*
SQLServer:General Statistics*
SQLServer:Latches*
System*
B. IIS Logs
IIS logs are used to capture and analyze IIS traffic from all the SharePoint Servers from the farm.
a. Click on Start -> Administrative Tools -> Internet Information Service (IIS) Manager
b. Click on the Machine node in the tree (left hand side). This will bring up the area view in the right hand side.
c. Double Click on Logging icon and a new logging screen will appear.
d. Check if the format is W3C if not switch to W3C
e. Schedule -> Daily
f. Click on Select Fields
g. Select all the fields to be logged
C. Enable Developer Dashboard
Developer dashboard can help you to obtain additional information regarding performance bottleneck.
This feature can be enabled using stsadm or PowerShell and has three modes:
· On – Developer Dashboard output is always rendered
· Off – Developer Dashboard output is never rendered
· OnDemand – Developer Dashboard output can be rendered on demand. A small icon will be present in the top right corner of the page.
To set developer dashboard mode to on-demand, use the following command:
C:program filescommon filesmicrosoft sharedweb server extensions14bin>stsadm –o setproperty –pn developer-dashboard –pv OnDemand
Additional information and configuration of developer dashboard can be found in this article:
D. Data Analysis
Once you have reproduced the issue you can collect the Performance Logs and IIS logs.
- In order to analyze the performance counters we have two options:
1. Pal report http://pal.codeplex.com/ Performance Analysis of Logs (PAL) Tool
Remark:
If your performance issue is randomly I recommend using option two
2. Microsoft Excel
We will convert the blg in txt
a. Start > Run…
b. Type cmd, click OK
c. Navigate where the current log files are stored (for example c:perfmon_logs):
d. Type c:, then press ENTER
e. Type cd perfmon_logs, then press ENTER
f. Type relog amplalog.blg -f csv -o amplalog.csv, then press ENTER.
Once the blg was converted in CSV we will open it with Excel:
g. Select the first column to change the format of the Date
h. Right Click on the column and click on Format Cells
i. Select the Date and add the Sample 3/14/01
j. Click ok
k. Select all the content of the csv (Ctrl+A)
l. Click Insert -> Pivot Table -> Pivot Chart
- For the IIS logs you can use Excel or log Parser http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24659
E. Performance counters Values
Related Links:
thank you!!! you saved me hours of research 🙂