SQL Server performance monitoring and tuning Buck Woody

Preview:

Citation preview

SQL Server SQL Server performance performance

monitoring and monitoring and tuningtuningBuck WoodyBuck Woody

About our speakerAbout our speaker Buck Woody,Buck Woody, Working with technology since 1979.Working with technology since 1979. Technical writer, DBA, technician, help desk, Technical writer, DBA, technician, help desk,

manager and consultant.manager and consultant. President of the Tampa SQL Server User GroupPresident of the Tampa SQL Server User Group Microsoft Certified Professional, Microsoft Microsoft Certified Professional, Microsoft

Certified Systems Engineer and Microsoft Certified Systems Engineer and Microsoft Certified Database AdministratorCertified Database Administrator

Experience with SQL Server, Oracle, MySQL, Experience with SQL Server, Oracle, MySQL, SQLPostgre, DB2SQLPostgre, DB2

Author Author Administrator’s Guide to SQL Server Administrator’s Guide to SQL Server 20052005

Make SQL Server fasterMake SQL Server faster

MethodologyMethodology Look at SQL Server from a holistic Look at SQL Server from a holistic

standpoint.standpoint. How to baseline a SQL Server system.How to baseline a SQL Server system. How to track it from a “landscape How to track it from a “landscape

perspective.”perspective.” Evaluate the system now and going Evaluate the system now and going

forwardforward

Phases of performance Phases of performance tuningtuning

Define componentsDefine componentsEvaluate objectsEvaluate objects Interpret findingsInterpret findingsCreate an action Create an action

planplan

Performance trackingPerformance tracking

Use tracking tool of your choiceUse tracking tool of your choice WordWord ExcelExcel DatabaseDatabase

Methodology works on any platformMethodology works on any platform

Define componentsDefine components

A holistic view of the landscapeA holistic view of the landscapePath determinationPath determinationSystemsSystemsSoftwareSoftwareHardwareHardware

The landscapeThe landscape

““Literally everything”Literally everything” Server itselfServer itself Clustering components, if clusteredClustering components, if clustered Networking, cards and driver levelsNetworking, cards and driver levels Routers and switchesRouters and switches Client workstationsClient workstations Etc.Etc.

An entire representation of your An entire representation of your environmentenvironment

Define componentsDefine components

A holistic view of the landscapeA holistic view of the landscapePath determinationPath determinationSystemsSystemsSoftwareSoftwareHardwareHardware

The pathThe path

Determine how data gets from a fairly Determine how data gets from a fairly unique client machine to the server.unique client machine to the server.

Diagram the path:Diagram the path: PaintPaint PowerPointPowerPoint VisioVisio Network toolsNetwork tools

Determine areas of slowdown.Determine areas of slowdown.

Define componentsDefine components

A holistic view of the landscapeA holistic view of the landscapePath determinationPath determinationSystemsSystemsSoftwareSoftwareHardwareHardware

The systemThe system

Document the architectureDocument the architecture Two tier – client and a serverTwo tier – client and a server Three tier – client, middle layer and a Three tier – client, middle layer and a

serverserver N tier – multiple systemsN tier – multiple systems SOA – lots of moving partsSOA – lots of moving parts

Define componentsDefine components

A holistic view of the landscapeA holistic view of the landscapePath determinationPath determinationSystemsSystemsSoftwareSoftwareHardwareHardware

The softwareThe software

Document software drivers, interfaces Document software drivers, interfaces and codeand code Only concerned with representative Only concerned with representative

systems.systems. Avoid making immediate changes; if you Avoid making immediate changes; if you

change the test, you can’t determine the change the test, you can’t determine the exact issue.exact issue.

Do take care of security issues.Do take care of security issues. WinMSDWinMSD

Graphical representation of your systemGraphical representation of your system

Define componentsDefine components

A holistic view – the landscapeA holistic view – the landscapePath determinationPath determinationSystemsSystemsSoftwareSoftwareHardwareHardware

The hardwareThe hardware

Document hardwareDocument hardware Networking Networking MemoryMemory Input/OutputInput/Output

hard driveshard drives storage area networks (SANs)storage area networks (SANs) network-attached storage (NAS) devicesnetwork-attached storage (NAS) devices

Evaluate objectsEvaluate objects ToolsTools Working with a baselineWorking with a baseline Working without a baselineWorking without a baseline Don’t fix anything yet!Don’t fix anything yet!

The toolsThe tools ToolsTools

SQL Server built-in toolsSQL Server built-in tools System and Performance Monitor System and Performance Monitor

Third-party toolsThird-party tools Collect objects and countersCollect objects and counters

MemoryMemory CPUCPU NetworkNetwork I/OI/O

Store dataStore data

Evaluate objectsEvaluate objects ToolsTools Working with a baselineWorking with a baseline Working without a baselineWorking without a baseline Don’t fix anything yet!Don’t fix anything yet!

Gather a baselineGather a baseline

Working with a baselineWorking with a baseline Collect data when the problem doesn’t Collect data when the problem doesn’t

exist.exist. Gather a lot of detail.Gather a lot of detail.

Working without a baselineWorking without a baseline Start broad and zero in on problems.Start broad and zero in on problems. Look at wider counters (i.e. CPU Look at wider counters (i.e. CPU

performance).performance).

Evaluate objectsEvaluate objects ToolsTools Working with a baselineWorking with a baseline Working without a baselineWorking without a baseline Don’t fix anything yet!Don’t fix anything yet!

Interpret findingsInterpret findings Gather subject matter expertsGather subject matter experts

You can’t do it all – don’t tryYou can’t do it all – don’t try Gather their thoughtsGather their thoughts

Make everyone come up with what they Make everyone come up with what they thinkthink

Agree on common interpretationsAgree on common interpretations Don’t sweat the small stuffDon’t sweat the small stuff

Table differencesTable differences Don’t fix anything yet!Don’t fix anything yet!

Create an action planCreate an action plan

Decide on the fixesDecide on the fixes Decide who should implementDecide who should implement Decide risks and rewardsDecide risks and rewards Detail timelinesDetail timelines Create backup planCreate backup plan ImplementImplement Monitor for change, reportMonitor for change, report

Methodology reviewMethodology review

1.1. Gather component listGather component list

2.2. Evaluate objectsEvaluate objects

3.3. Interpret findingsInterpret findings

4.4. Create an action planCreate an action plan

ResourcesResources SearchSQLServer.com Performance and SearchSQLServer.com Performance and

Tuning: Tuning: http://searchSQLServer.com/r/0,,59918,00.hthttp://searchSQLServer.com/r/0,,59918,00.htmm??

InformIT.com: InformIT.com: http://www.informit.comhttp://www.informit.com (Click on Reference Guides, then SQL Server)(Click on Reference Guides, then SQL Server)

SQL-Server-Performance.com: SQL-Server-Performance.com: http://sql-server-performance.comhttp://sql-server-performance.com

Administrator’s Guide to SQL Server 2005Administrator’s Guide to SQL Server 2005