+ All Categories
Home > Documents > Commonly used Performance Objects for SQL Server...

Commonly used Performance Objects for SQL Server...

Date post: 06-Jul-2020
Category:
Upload: others
View: 11 times
Download: 0 times
Share this document with a friend
21
Commonly used Performance Objects for SQL Server analysis Performance Object SQL2000 SQL2005 SQL2008 (RC0) Memory * * * Network Interface * * * Paging File * * * LogicalDisk * * * PhysicalDisk * * * Process * * * Processor * * * System * * * SQL Server:Access Methods * * * SQL Server:Backup Device - * * SQL Server:Broker Activation - * * SQL Server:Broker Statistics - * * SQL Server:Broker TO Statistics - - * SQL Server:Broker /DBM Transport - * * SQL Server:Buffer Manager * * * SQL Server:Buffer Node - * * SQL Server:Buffer Partition - * * SQL Server:Cache Manager * ? * SQL Server:Catalog Metadata - * * SQL Server:CLR - * * SQL Server:Cursor Manager by Type - * * SQL Server:Cursor Manager Total - * * SQL Server:Database Mirroring - * * SQL Server:Databases * * * SQL Deprecated Features - - * SQL Server:Exec Statistics ? * * SQL Server:General Statistics * * * SQL Server:Latches * * * SQL Server:Locks * * * SQL Server:Memory Manager * * * SQL Server:Plan Cache - * * SQL Server:Replication Agents ? * * SQL Server:Replication Dist. ? * * SQL Server:Replication LogReader ? * * SQL Server:Replication Merge ? * * SQL Server:Replication Snapshot ? * * SQL Server:Resource Pool - - * SQL Server:SQL Errors * * * SQL Server:SQL Statistics * * * SQL Server:SSIS Service - * * SQL Server:Transactions * * * SQL Server:User Settable * * * SQL Server:Wait Statistics - * * SQL Server:Workload Group Stats - - * SQL Server 2000 Performance Objects SQL Server 2005 Performance Objects SQL Server 2008 Performance Objects (pending)
Transcript
Page 1: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

Commonly used Performance Objects for SQL Server analysisPerformance Object SQL2000 SQL2005 SQL2008 (RC0)

Memory * * *Network Interface * * *Paging File * * *LogicalDisk * * *PhysicalDisk * * *Process * * *Processor * * *System * * *SQL Server:Access Methods * * *SQL Server:Backup Device - * *SQL Server:Broker Activation - * *SQL Server:Broker Statistics - * *SQL Server:Broker TO Statistics - - *SQL Server:Broker /DBM Transport - * *SQL Server:Buffer Manager * * *SQL Server:Buffer Node - * *SQL Server:Buffer Partition - * *SQL Server:Cache Manager * ? *SQL Server:Catalog Metadata - * *SQL Server:CLR - * *SQL Server:Cursor Manager by Type - * *SQL Server:Cursor Manager Total - * *SQL Server:Database Mirroring - * *SQL Server:Databases * * *SQL Deprecated Features - - *SQL Server:Exec Statistics ? * *SQL Server:General Statistics * * *SQL Server:Latches * * *SQL Server:Locks * * *SQL Server:Memory Manager * * *SQL Server:Plan Cache - * *SQL Server:Replication Agents ? * *SQL Server:Replication Dist. ? * *SQL Server:Replication LogReader ? * *SQL Server:Replication Merge ? * *SQL Server:Replication Snapshot ? * *SQL Server:Resource Pool - - *SQL Server:SQL Errors * * *SQL Server:SQL Statistics * * *SQL Server:SSIS Service - * *SQL Server:Transactions * * *SQL Server:User Settable * * *SQL Server:Wait Statistics - * *SQL Server:Workload Group Stats - - *

SQL Server 2000 Performance ObjectsSQL Server 2005 Performance ObjectsSQL Server 2008 Performance Objects (pending)

Page 2: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

'start a perfmon counter log from the command linelogman start dbPerfLog

'stop a perfmon counter log from the command linelogman stop dbPerfLog

'defining perfmon counter logs' options' -si 05 sample interval of 5s' -v nnnn append file version info' -max max size of log file' -o path' -c perf counters' for more info, execute logman -?

'define a perfmon counter log for a SQL Server 2005 service named "SQLServer"call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

'define a perfmon counter log for a Katmai service named "MSSQL$KATMAI"call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Per Burzin Patel: TIP: you can reduce the size of the command line by using the –config option and passing in a parameter file.

Description of the Windows XP Logman.exe, Relog.exe, and Typeperf.exe Toolshttp://support.microsoft.com/kb/303133

Logman.exeYou can use the Logman.exe tool to: • Remotely start and stop log file data collections from a central location by specifying the remote computer name. • Configure a data collection on one computer and then copy that configuration to multiple computers from a central location. • Query currently-running logs and traces. ExampleIf Sample_Log is the name of an existing performance log on the local computer, this command starts the log:

logman start Sample_Log

Relog.exeYou can use the Relog.exe tool to:• Convert a log from one type to another, such as a Microsoft Windows NT 4.0 log to a Windows XP log, or a binary log file (.blg) to a comma-separated values (.csv) file. • Resample a log file, and then create a new log file that is based on specified counters, a time period, or a sampling interval. ExampleTo convert a Windows 2000 log file that is named Win2k_log to a .csv log file that is named Win2k_log.csv, you would use:

relog Win2k_log.blg -f CSV -o Win2k_log.csv

Typeperf.exeYou can use the Typeperf.exe tool to: • Write performance data to the command window or to a supported log file format. • Display all of the counters that are currently available on a particular local or remote computer. ExampleTo output the Memory counter, Available Bytes, from a remote computer that is named "XPPRO", every 5 seconds, you would use:

typeperf "Memory\Available Bytes" -s XPPRO -si 00:05

Logman cmd ref

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/nt_command_logman.mspx

Relog cmd ref

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/nt_command_relog.mspx

Typeperf cmd ref

http://technet.microsoft.com/en-us/library/bb490960.aspx

Page 3: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Per Burzin Patel: TIP: you can reduce the size of the command line by using the –config option and passing in a parameter file.

• Remotely start and stop log file data collections from a central location by specifying the remote computer name. • Configure a data collection on one computer and then copy that configuration to multiple computers from a central location.

If Sample_Log is the name of an existing performance log on the local computer, this command starts the log:

• Convert a log from one type to another, such as a Microsoft Windows NT 4.0 log to a Windows XP log, or a binary log file (.blg) to a comma-separated values (.csv) file. • Resample a log file, and then create a new log file that is based on specified counters, a time period, or a sampling interval.

To convert a Windows 2000 log file that is named Win2k_log to a .csv log file that is named Win2k_log.csv, you would use:

• Display all of the counters that are currently available on a particular local or remote computer.

To output the Memory counter, Available Bytes, from a remote computer that is named "XPPRO", every 5 seconds, you would use:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/nt_command_logman.mspx

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/nt_command_relog.mspx

Page 4: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 5: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 6: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 7: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 8: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 9: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLog" -si 05 -v nnnnnn -max 100 -o "C:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\SQLServer:Access Methods(*)\*" "\SQLServer:Buffer Manager(*)\*" "\SQLServer:Buffer Node(*)\*" "\SQLServer:Buffer Partition(*)\*" "\SQLServer:Cursor Manager by Type(*)\*" "\SQLServer:Cursor Manager Total(*)\*" "\SQLServer:Databases(*)\*" "\SQLServer:Exec Statistics(*)\*" "\SQLServer:General Statistics(*)\*" "\SQLServer:Latches(*)\*" "\SQLServer:Locks(*)\*" "\SQLServer:Memory Manager(*)\*" "\SQLServer:Plan Cache(*)\*" "\SQLServer:SQL Errors(*)\*" "\SQLServer:SQL Statistics(*)\*" "\SQLServer:Wait Statistics(*)\*"

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 10: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

call Logman create counter "dbPerfLogSQL10" -si 05 -v nnnnnn -max 100 -o "U:\perflogs\dbPerf" -c "\LogicalDisk(*)\*" "\PhysicalDisk(*)\*" "\Process(*)\*" "\Processor(*)\*" "\System\*" "\Network Interface(*)\*" "\Memory(*)\*" "\Paging File(*)\*" "\MSSQL$KATMAI:Access Methods(*)\*" "\MSSQL$KATMAI:Buffer Manager(*)\*" "\MSSQL$KATMAI:Buffer Node(*)\*" "\MSSQL$KATMAI:Buffer Partition(*)\*" "\MSSQL$KATMAI:Cursor Manager by Type(*)\*" "\MSSQL$KATMAI:Cursor Manager Total(*)\*" "\MSSQL$KATMAI:Databases(*)\*" "\MSSQL$KATMAI:Exec Statistics(*)\*" "\MSSQL$KATMAI:General Statistics(*)\*" "\MSSQL$KATMAI:Latches(*)\*" "\MSSQL$KATMAI:Locks(*)\*" "\MSSQL$KATMAI:Memory Manager(*)\*" "\MSSQL$KATMAI:Plan Cache(*)\*" "\MSSQL$KATMAI:SQL Errors(*)\*" "\MSSQL$KATMAI:SQL Statistics(*)\*" "\MSSQL$KATMAI:Wait Statistics(*)\*"

Page 11: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

CounterSource

MyStatu

s

VitalSigns

Performance Object Counter

Hardware 1° X Kernel Available MBytesHardware 2° X Kernel Cache BytesHardware 1° X Kernel Free System Page Table EntriesHardware 2° Kernel Page Faults/secHardware 1° X Kernel Pages/secHardware 2° X Kernel Pool NonPaged BytesHardware 2° X Kernel Pool Paged BytesHardware 2° X Kernel System Cache Resident Bytes

Hardware 2° X Network Interface Bytes total/secHardware 2° X Network Interface Current BandwithHardware 2° X Network Interface Output Queue LengthHardware 2° X PhysicalDisk/LogicalDisk % Idle TimeHardware 1° X PhysicalDisk/LogicalDisk Avg. Disk sec/ReadHardware 1° PhysicalDisk/LogicalDisk Avg. Disk sec/Transfer

Hardware 1° X PhysicalDisk/LogicalDisk Avg. Disk sec/WriteHardware 3° PhysicalDisk/LogicalDisk Disk Bytes/secHardware 3° PhysicalDisk/LogicalDisk Disk Read Bytes/secHardware 3° PhysicalDisk/LogicalDisk Disk Write Bytes/secHardware 2° X PhysicalDisk/LogicalDisk Disk Reads/secHardware 2° X PhysicalDisk/LogicalDisk Disk Transfers/secHardware 2° X PhysicalDisk/LogicalDisk Disk Writes/secHardware 3° PhysicalDisk/LogicalDisk Split IO/secHardware 2° Process % Processor TimeHardware 2° Process Page Faults/secHardware 1° X Process Handle CountHardware 1° X Process IO Data Operations/secHardware 1° X Process IO Other Operations/secHardware 1° X Process Private BytesHardware 1° X Process Thread CountHardware 1° X Process Working SetHardware 1° X Processor % Privileged TimeHardware 1° X Processor % Processor TimeHardware 1° X Processor % UserHardware 1° System Context Switches/secSQL Server 1° Access Methods Full Scans/secSQL Server 1° Access Methods Index Searches/sec

SQL Server 1° Buffer Manager Buffer Cache Hit RatioSQL Server 2° Buffer Manager Lazy writes/secSQL Server 1° Buffer Manager Page Life ExpectancySQL Server 1° Buffer Manager Procedure Cache PagesSQL Server 2° Plan Cache Cache Pages

SQL Server 2° Buffer Manager Total pagesSQL Server 2° Cache Manager Cache Hit RatioSQL Server 2° Databases Log Flushes/secSQL Server 2° Databases Transactions/secSQL Server 2° Latches Average Latch Wait Time (ms)SQL Server 1° Latches Latch Waits/secSQL Server 1° Latches Total Latch Wait Time (ms)SQL Server 1° Memory Manager Memory Grants Pending

SQL Server 1° Memory Manager Target Server MemorySQL Server 1° Memory Manager Total Server MemorySQL Server 1° SQL Statistics Batch Requests/secSQL Server 1° SQL Statistics SQL Compilations/secSQL Server 1° SQL Statistics SQL Recompilations/sec

Counters pending review:SQL Server:Buffer Manager Free list stalls/sec < 2SQL Server:Buffer Manager Free pages > 640SQL Server:Buffer Manager Lazy Writes/Sec < 20SQLServer:Buffer Manager Page lookups/sec (Page lookups/sec) / (Batch Requests/sec) < 100SQL Server:Buffer Manager Page reads/sec < 90SQL Server:Buffer Manager Page writes/sec < 90

Page 12: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

Instance Threshold

<10MB fatal, <100MB cause for concern

<5,000 bad, <3,000 very bad; <7,000 threshold to removed /3GB (per Uttam Parui)< a few hundred is desirable, in the thousands acceptable if other memory counters are OK (see Process object)>2500/s bad for modern servers; much less for older servers; avg/sustained <25% of HDD or <10% RAM; MUCH less for SQL Server 32-bit: 100MB-260MB; 64-bit: 1GB-128GB (depends on total physical RAM; is it close to being consumed)32-bit: 120MB-480MB; 64-bit: 1GB-128GB (depends on total physical RAM; is it close to being consumed)

* <40% good; 40%-65% caution; 65%-100% critical Machine-Specific* <80%* 0 healthy; 1-2 caution; >2 critical* 50% good; 15%-50% warning; 0%-15% busy* Disk Latency <=5 ms Excellent* Disk Latency 5-10 ms Good

* Disk Latency 10-20 ms Reasonable* Disk Latency is a great metric because it is independent of spindle count* Note: Recent thinking (Greg Moss) is that Disk Queues for SQL Server must be zero** }~150 (for random) Source: readme.txt sqlio v1.5 11/17/99* }* }* Fewer the better_Total,<sqlservr>_Total,<sqlservr> < a few hundred is desirable, in the thousands acceptable if other memory counters are OK_Total,<sqlservr>_Total,<sqlservr>_Total,<sqlservr>_Total,<sqlservr>_Total,<sqlservr>_Total,<sqlservr>

SQL Server is a USER MODE app!5,000/s x # of CPUs; somewhat flexible if other CPU-related counters are good--including low SQL compiles/shttp://www.sql-server-performance.com/sql_server_performance_audit2.asp

(Index Searches/sec)/(Full Scans/sec) > 1000 http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

(Index Searches/sec)/(Full Scans/sec) > 1000 http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

98% OK, 99% better, 99.8% desirablebaseline<300s "official" threshold; >1,000 or >10,000s much betterMemory Mattershttp://www.sqlmag.com/Articles/Print.cfm?ArticleID=44556(2000) prefer stable values, otherwise cache thrash may be occurringMemory Mattershttp://www.sqlmag.com/Articles/Print.cfm?ArticleID=44556(2005) prefer stable values, otherwise cache thrash may be occurring

baseline<99.9 excellent; <99 good; >98 not optimalbaselinebaseline~(Total Latch Wait Time) / (Latch Waits/Sec) < 10 http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

(Total Latch Wait Time) / (Latch Waits/Sec) < 10 http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

>0 is cause for concern Memory Mattershttp://www.sqlmag.com/Articles/Print.cfm?ArticleID=44556

high or rising value indicates insufficient memory Memory Matters~=Physical Ram Memory MattersOLTP workloads: server should support ~2,500/s/coreif compiles > 10% of Batch Requests, then app may not be caching effectivelyRecompiles > 10% of Compilations should be investigatedCACHING WhitePaper

Free list stalls/sec is the frequency with which requests for available database pages are suspended because no buffers are available. Free list stall rates of 3 or 4 per second indicate too little SQL memory available.Total number of pages on all free lists.This counter tracks how many times a second that the Lazy Writer process is moving dirty pages from the buffer to disk in order to free up buffer space. Generally speaking, this should not be a high value, say more than 20 per second or so.  Ideally, it should be close to zero. If it is zero, this indicates that your SQL Server's buffer cache is plenty big and SQL Server doesn't have to free up dirty pages, instead waiting for this to occur during regular checkpoints. If this value is high, then a need for more memory is indicated.

(Page lookups/sec) / (Batch Requests/sec) < 100 Number of requests to find a page in the buffer pool. When the ratio of page lookups to batch requests is much greater than 100, this is an indication that while query plans are looking up data in the buffer pool, these plans are inefficient. Identify queries with the highest amount of logical I/O's and tune them. Number of physical database page reads issued. 80 – 90 per second is normal, anything that is above indicates indexing or memory constraint.Number of physical database page writes issued. 80 – 90 per second is normal, anything more we need to check the lazy writer/sec and checkpoint counters, if these counters are also relatively high then, it’s memory constraint.

Page 13: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

< a few hundred is desirable, in the thousands acceptable if other memory counters are OK (see Process object)>2500/s bad for modern servers; much less for older servers; avg/sustained <25% of HDD or <10% RAM; MUCH less for SQL Server 32-bit: 100MB-260MB; 64-bit: 1GB-128GB (depends on total physical RAM; is it close to being consumed)32-bit: 120MB-480MB; 64-bit: 1GB-128GB (depends on total physical RAM; is it close to being consumed)

Spikes<50Ruling out Disk-Bound Problems<http://www.microsoft.com/technet/prodtechnol/exchange/Guides/TrblshtE2k3Perf/5bcdd349-dcc6-43eb-9dc3-54175f7061ad.mspx>

Disk Latency is a great metric because it is independent of spindle countNote: Recent thinking (Greg Moss) is that Disk Queues for SQL Server must be zero

Source: readme.txt sqlio v1.5 11/17/99

< a few hundred is desirable, in the thousands acceptable if other memory counters are OK

http://www.sql-server-performance.com/sql_server_performance_audit2.asp

http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

http://www.sqlmag.com/Articles/Print.cfm?ArticleID=44556

http://www.sqlmag.com/Articles/Print.cfm?ArticleID=44556

http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm

http://www.sqlmag.com/Articles/Print.cfm?ArticleID=44556

Free list stalls/sec is the frequency with which requests for available database pages are suspended because no buffers are available. Free list stall rates of 3 or 4 per second indicate too little SQL memory available.

This counter tracks how many times a second that the Lazy Writer process is moving dirty pages from the buffer to disk in order to free up buffer space. Generally speaking, this should not be a high value, say more than 20 per second or so.  Ideally, it should be close to zero. If it is zero, this indicates that your SQL Server's buffer cache is plenty big and SQL Server doesn't have to free up dirty pages, instead waiting for this to occur during regular checkpoints. If this value is high, then a need for more memory is indicated.Number of requests to find a page in the buffer pool. When the ratio of page lookups to batch requests is much greater than 100, this is an indication that while query plans are looking up data in the buffer pool, these plans are inefficient. Identify queries with the highest amount of logical I/O's and tune them. Number of physical database page reads issued. 80 – 90 per second is normal, anything that is above indicates indexing or memory constraint.Number of physical database page writes issued. 80 – 90 per second is normal, anything more we need to check the lazy writer/sec and checkpoint counters, if these counters are also relatively high then, it’s memory constraint.

Page 14: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

<http://www.microsoft.com/technet/prodtechnol/exchange/Guides/TrblshtE2k3Perf/5bcdd349-dcc6-43eb-9dc3-54175f7061ad.mspx>

This counter tracks how many times a second that the Lazy Writer process is moving dirty pages from the buffer to disk in order to free up buffer space. Generally speaking, this should not be a high value, say more than 20 per second or so.  Ideally, it should be close to zero. If it is zero, this indicates that your SQL Server's buffer cache is plenty big and SQL Server doesn't have to free up dirty pages, instead waiting for this to occur during regular checkpoints. If this value is high, then a need for more memory is indicated.Number of requests to find a page in the buffer pool. When the ratio of page lookups to batch requests is much greater than 100, this is an indication that while query plans are looking up data in the buffer pool, these plans are inefficient. Identify queries with the highest amount of logical I/O's and tune them.

Number of physical database page writes issued. 80 – 90 per second is normal, anything more we need to check the lazy writer/sec and checkpoint counters, if these counters are also relatively high then, it’s memory constraint.

Page 15: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

This counter tracks how many times a second that the Lazy Writer process is moving dirty pages from the buffer to disk in order to free up buffer space. Generally speaking, this should not be a high value, say more than 20 per second or so.  Ideally, it should be close to zero. If it is zero, this indicates that your SQL Server's buffer cache is plenty big and SQL Server doesn't have to free up dirty pages, instead waiting for this to occur during regular checkpoints. If this value is high, then a need for more memory is indicated.

Page 16: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

This counter tracks how many times a second that the Lazy Writer process is moving dirty pages from the buffer to disk in order to free up buffer space. Generally speaking, this should not be a high value, say more than 20 per second or so.  Ideally, it should be close to zero. If it is zero, this indicates that your SQL Server's buffer cache is plenty big and SQL Server doesn't have to free up dirty pages, instead waiting for this to occur during regular checkpoints. If this value is high, then a need for more memory is indicated.

Page 17: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

Performance Objects & Counters

Performance Object(see Notes below regarding Logical Disk)

Performance Counter JWM Troubleshooting Performance

Problems in SQL Server 2005

I/O Predeploymen

t Best Practices

Physical Disk % Idle Time 3°Physical Disk % Disk Time 3°Physical Disk Avg. Disk Bytes/Read 3° XPhysical Disk Avg. Disk 3°Physical Disk Avg. Disk Bytes/Write 3° XPhysical Disk Avg. Disk Queue Length 3° XPhysical Disk Avg. Disk sec/Read 1° X XPhysical Disk Avg. Disk sec/Transfer 1°Physical Disk Avg. Disk sec/Write 1° X XPhysical Disk Disk Bytes/sec 2°Physical Disk Disk Read Bytes/sec 2° XPhysical Disk Disk Write Bytess/sec 2° XPhysical Disk Disk Reads/sec 2° X XPhysical Disk Disk Transfers/sec 2°Physical Disk Disk Writes/sec 3° X X

Note: The I/O Predeployment article recommends either Physical Disk or Logical Disk, depending on "the specific storage configuration that is being tested".Note: I recommend capturing BOTH Physical Disk & Logical Disk to help discriminate challenges related, e.g., to shared disks.

ReferencesInside Microsoft SQL Server 2005: Query Tuning and Optimization , edited by Kalen Delaney, Chapter 1 authored by Sunil Agarwal, "A Performance Tuning Methodology", I/O Bottlenecks section, pp. 32-37, Microsoft Press, ISBN 0735621969

http://www.microsoft.com/MSPress/books/8565.aspx

Troubleshooting Performance Problems in SQL Server 2005http://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspx

Sunil Agarwal, Boris Baryshnikov, Tom Davidson, Keith Elmore, Denzil Ribeiro, Juergen ThomasPredeployment I/O Best Practices

http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/pdpliobp.mspx

SQL Server Best Practices ArticleWriter: Mike RuthruffContributors: Michael Thomassy, Prem MehraTechnical Reviewers: Robert Dorr, Stuart Ozer, Juergen Thomas, Lindsey Allen, Burzin Patel, Bill Emmert, Bruce Worthington, Sanjay Mishra

Page 18: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

Inside SQL 2005: Query

Tuning & Optimizati

on

Vital Signs (Shane

Creamer)

X

XX X

X X

XX X

XX

Note: The I/O Predeployment article recommends either Physical Disk or Logical Disk, depending on "the specific storage configuration that is being tested".Note: I recommend capturing BOTH Physical Disk & Logical Disk to help discriminate challenges related, e.g., to shared disks.

Inside Microsoft SQL Server 2005: Query Tuning and Optimization , edited by Kalen Delaney, Chapter 1 authored by Sunil Agarwal, "A Performance Tuning Methodology", I/O Bottlenecks section, pp. 32-37, Microsoft Press, ISBN 0735621969

Technical Reviewers: Robert Dorr, Stuart Ozer, Juergen Thomas, Lindsey Allen, Burzin Patel, Bill Emmert, Bruce Worthington, Sanjay Mishra

Page 19: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

Inside Microsoft SQL Server 2005: Query Tuning and Optimization , edited by Kalen Delaney, Chapter 1 authored by Sunil Agarwal, "A Performance Tuning Methodology", I/O Bottlenecks section, pp. 32-37, Microsoft Press, ISBN 0735621969

Page 20: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

Vital Signs is a 3-day Microsoft workshop authored & offered by PFE Shane [email protected]

There is no other workshop on the planet like it. I strongly encourage anyone interested in performance to take this class.Most of the counters & thresholds cited in this class reflect the values from this class.

Microsoft PFE Shane Cramer is the Yoda of PerfMon.He has created a workshop called Vital Signs.It is already available for public consumption, and he’s rumored to be updating it soon to a formal SKU.Whether you’re new to PerfMon or want to take your skills from Padawan to Jedi Master, the Vital Signs workshop is for you.

Stay tuned for updates & URLs.

Page 21: Commonly used Performance Objects for SQL Server analysisdocshare03.docshare.tips/files/21183/211832477.pdf · Commonly used Performance Objects for SQL Server analysis Performance

It is already available for public consumption, and he’s rumored to be updating it soon to a formal SKU.Whether you’re new to PerfMon or want to take your skills from Padawan to Jedi Master, the Vital Signs workshop is for you.


Recommended