Friday, April 5, 2013

Configuring SharePoint Performance Counters

Troubleshooting SharePoint performance issue is a daunting task. There are various logs that need to be analyzed and correlated to come to a conclusion. Sometimes an observation in one log can lead to verification in other logs along the same time. Performance counters play a vital role during performance investigation. Performance counters logs contain various data over a period of time and provides a snapshot on the resource consumption during the period.

It is very important to collect these logs on a continuous basis. This will allow creating a baseline of the resource consumption over a period of time. When an issue occurs, these counters can then be analyzed and compared with respect to the baseline data to understand any abnormal behavior in the system.

1. A predefined set of counters need to be defined that will be monitored on a continuous basis. The set of counters are different in web, index and database servers. The lists of counters for different types of servers are mentioned at the end of the article.

2. Create a text file named WFEPerfCounterList_MOSS2007.txt (name will change based on the server where you are configuring the counters) that contains the above set of counters.3. Now we will use the command prompt to create the counters in the perfmon. Note that we will create two set of counters – one of baseline and one for incident – on every server. The baseline counters will run continuously on all the servers and will poll every 1 min to collect the data for baseline. Incident counters will be turned on only when there is an issue. This will poll every 5 seconds to collect data. 
Baseline counters:logman create counter Perf_Baseline -s %COMPUTER NAME% -o C:\PerfLogs\Perf_Baseline_%COMPUTER NAME%.blg -f bin -v mmddhhmm -cf WFECounterList_MOSS2007.txt -si 00:01:00 -cnf 12:00:00 -b 4/29/2009 6:00AM -u "domain\userid" *

The name of the file (.txt) mentioned in the command needs to be updated based on the server where the counters are being created. This command will create a set of counters with the name "Perf_Baseline". All the counters that are mentioned in "WFECounterList_MOSS2007.txt" will be added. The data will be collected at a frequency of 1 minute. A new file will be created every 12 hours. It will be started automatically.


Incident counters:
logman create counter Perf_Incident -s %COMPUTER NAME% -o C:\PerfLogs\Perf_Incident_%COMPUTER NAME%.blg -f bin -v mmddhhmm -cf WFECounterList_MOSS2007.txt -si 00:00:05 -max 500 -u "domain\userid" *

The name of the file (.txt) mentioned in the command needs to be updated based on the server where the counters are being created. This command will create a set of counters with the name "Perf_Incident". All the counters that are mentioned in "WFECounterList_MOSS2007.txt" will be added. The data will be collected at a frequency of 5 seconds. A new file will be created every 12 hours. This will only create the counters but will not be started. This needs to be manually started only when an issue occurs.

To start the incident based counter, issue the following command from a command line prompt:
logman start Perf_Incident -s %COMPUTER NAME%.

The only difference between the above two counters is the frequency of running. Since the Incident counters collect the data every 5 seconds, it might cause an overhead for the system if run on a continuous basis.
Web/Query server (File name: WFECounterList_MOSS2007.txt)


\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\*
\Network Interface(*)\*
\PhysicalDisk(*)\*
\SharePoint Publishing Cache(*)\*
\System\*
\TCPv4\*
\TCPV6\*
\Threads\*
\Web Service(*)\*
\Web Service Cache\*

Index server (File name: IndexCounterList_MOSS2007.txt)

\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\*
\Network Interface(*)\*
\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(*)\*
\Office Server Search Archival Plugin(*)\*
\Office Server Search Gatherer\*
\Office Server Search Gatherer Projects(*)\*
\Office Server Search Indexer Catalogs(*)\*
\Office Server Search Schema Plugin(*)\*
\System\*
\TCPv4\*
\TCPv6\*
\Threads\*
Database server (File name: SQLCounterList_MOSS2007.txt)

\.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:BufferManager\*
\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\*
\TCPv4\*
\TCPv6\*



No comments:

Post a Comment