Www.edgewoodsolutions.com© Edgewood Solutions 20051 SQL Server Performance Tuning Concepts MDCFUG September 13, 2005 Jeremy Kadlec of Edgewood Solutions.

Slides:



Advertisements
Similar presentations
DAT 342 Advanced SQL Server Performance and Tuning Bren Newman Program Manager SQL Server Development Microsoft Corporation.
Advertisements

Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
MCTS GUIDE TO MICROSOFT WINDOWS 7 Chapter 10 Performance Tuning.
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
Managing Data Resources
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Chapter 11 - Monitoring Server Performance1 Ch. 11 – Monitoring Server Performance MIS 431 – created Spring 2006.
70-270, MCSE/MCSA Guide to Installing and Managing Microsoft Windows XP Professional and Windows Server 2003 Chapter Thirteen Performing Network.
Database Administration
11 MONITORING MICROSOFT WINDOWS SERVER 2003 Chapter 3.
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 14 Server and Network Monitoring.
Maintaining and Updating Windows Server 2008
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 14: Troubleshooting Windows Server 2003 Networks.
Module 14 Monitoring and Maintaining Windows Server® 2008 Servers.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Passage Three Introduction to Microsoft SQL Server 2000.
Database Administration Chapter 16. Need for Databases  Data is used by different people, in different departments, for different reasons  Interpretation.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Virtual Memory Tuning   You can improve a server’s performance by optimizing the way the paging file is used   You may want to size the paging file.
Copyright © 2007 Quest Software The Changing Role of SQL Server DBA’s Bryan Oliver SQL Server Domain Expert Quest Software.
Network and Active Directory Performance Monitoring and Troubleshooting NETW4008 Lecture 8.
1 Chapter Overview Monitoring Server Performance Monitoring Shared Resources Microsoft Windows 2000 Auditing.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
Net Optics Confidential and Proprietary Net Optics appTap Intelligent Access and Monitoring Architecture Solutions.
Introduction Optimizing Application Performance with Pinpoint Accuracy What every IT Executive, Administrator & Developer Needs to Know.
MCTS Guide to Microsoft Windows 7
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
Online Database Support Experiences Diana Bonham, Dennis Box, Anil Kumar, Julie Trumbo, Nelly Stanfield.
Module 7: Fundamentals of Administering Windows Server 2008.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
Introduction Journal Analysis and Optimization Journaling Uses and Benefits Understanding Costs and Implications Ongoing Management and Administration.
Agenda for Today Do Chapter 14 Final Project Review for Final.
Monitoring Windows Server 2012
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
11 MANAGING PERFORMANCE Chapter 16. Chapter 16: MANAGING PERFORMANCE2 OVERVIEW  Optimize memory, disk, and CPU performance  Monitor system performance.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
1 Oracle Enterprise Manager Slides from Dominic Gélinas CIS
ESRI User Conference 2004 ArcSDE. Some Nuggets Setup Performance Distribution Geodatabase History.
Database Administration
Module 9 Planning and Implementing Monitoring and Maintenance.
Windows Server 2003 系統效能監視 林寶森
MISSION CRITICAL COMPUTING Siebel Database Considerations.
1 Copyright © 2005, Oracle. All rights reserved. Following a Tuning Methodology.
Presented by Vishy Grandhi.  Lesson 1: AX Overview  Lesson 2: Role based security  Lesson 3: Monitoring  Troubleshooting.
Module 14 Monitoring and Maintaining Windows Server® 2008 Servers.
Week 7 Lecture Part 2 Introduction to Database Administration Samuel S. ConnSamuel S. Conn, Asst Professor.
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
Dave LinkedIn
If you have a transaction processing system, John Meisenbacher
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
3 Copyright © 2006, Oracle. All rights reserved. Designing and Developing for Performance.
CFUNITED – The premier ColdFusion conference SQL Server 2000 and 2005 Performance Tuning Jeremy Kadlec Edgewood Solutions
SQL Database Management
Monitoring Windows Server 2012
Benchmarking the forgotten Role of Performance Tuning
Query Performance Tuning: Start to Finish
MCTS Guide to Microsoft Windows 7
SQL Server Monitoring Overview
MONITORING MICROSOFT WINDOWS SERVER 2003
Software Architecture in Practice
Where to Start, What You Need
Introduction of Week 6 Assignment Discussion
Performance And Scalability In Oracle9i And SQL Server 2000
Presentation transcript:

Edgewood Solutions SQL Server Performance Tuning Concepts MDCFUG September 13, 2005 Jeremy Kadlec of Edgewood Solutions |

Edgewood Solutions Session Agenda Jeremy Kadlec and Edgewood Solutions Overview, challenges and options Performance tuning methodology Performance management continuum Critical performance issues Performance Monitor/SQL Profiler Q & A, summary and thank you

Edgewood Solutions Jeremy Kadlec Edgewood Solutions ( –Customer focused SQL Server solutions –Planning, Audits, Integration, Training, Products Performance Tuning, Administration, Development, Upgrades, Disaster Recovery, Database Auditing Principal Database Engineer – Author of numerous SQL Server resources – –SearchSQLServer.com – Ask the Experts –The Rational Guide to IT Project Management NOVA SQL Co-Leader –

Edgewood Solutions People, Process, Technology Talented team with architecture, hardware, development and database expertise Documented and practiced processes to analyze, prioritize, develop, test, implement and learn Intuitive tools with the ability to make informed decisions and accurate corrections efficiently People Technology Process

Edgewood Solutions Performance Tuning Best Practices Focus on performance needs from the project scope to maintenance Design and develop for high performance Hardware, Windows, SQL Server and application System baseline with ongoing comparisons Monitor, analyze, alert and report Solidified change management process Properly designate permissions based on duties Work towards continuous improvements

Edgewood Solutions Performance Tuning Basics Art and a science People, Processes and Technology Few simple problems, typically complex based on application Holistic view needed Goal – Accurate and efficient correction without any biases Analyze Prioritize Develop Test Implement Learn Perf Tuning - Circle of Life

Edgewood Solutions Performance Tuning Challenges Difficult to create a baseline and compare over time to current status Exorbitant amount of data to manage and analyze = ‘analysis paralysis’ Multiple tools to manage the tiers and they are not compatible Difficult to distinguish the issue at an object level or tier = ‘finger pointing’

Edgewood Solutions Challenges - Continued Cannot further impact the performance of the production system Understand production, not simulation Need for real time and historical view of performance data in a single system Record of changes over time and subsequent impact once implemented Throw hardware at the problem as a quick fix

Edgewood Solutions Performance Tuning Needs Full life cycle tool for application development and production support Quickly determine the root cause and focus resources for efficient correction No additional overhead for system analysis and short learning curve Meaningful data for decision making Automated, proactive and real-time

Edgewood Solutions Performance Tuning Continuum SQL Server Performance Tuning Process Automation Educated Guess Manual Automated Hunt and Peck Tool Set Entire company Reactive approach No tools Entire company Reactive approach Disjointed tools Entire company Proactive approach Integrated tools People: Process: Technology:

Edgewood Solutions Educated Guess Users notify Help Desk of system issues Help desk scrambles IT to find the problem IT frantically searches for the problem –Network, Windows, SQL Server, front end application, logs, etc Unable to find issue  report to Help Desk User escalation to management IT monitor for symptoms and make changes to benefit the users, but cannot validate Problem = Lack of information

Edgewood Solutions Hunt and Peck Approach Ask users where problems exist Monitor SQL Server to capture data Review data to determine issues Change SQL Server based on data –Re-design, code changes, indexing, etc. Monitor to determine improvement Problem = Information Overload

Edgewood Solutions x7 Performance Monitoring Install, configure and baseline Review data from integrated tools Current and historical view of system Proactively and intuitively review Focus IT Team on objects requiring the most resources Correct and validate improvement

Edgewood Solutions Enterprise Manager Overview – Primary tool to manage all SQL Server functionality across the enterprise Features – Ability to manage database processes, locking, indexes, configurations, etc.

Edgewood Solutions Performance Monitor Overview – Capture a macro view of the servers with the ability to configure counters with specific sample rates save to a log file or real time monitor Counters –Memory, Processors –SQL Server –Network Activity, Disk Drives –System Statistics (Threads, Context Switching, Queuing, etc.) Samples – Secs to mins

Edgewood Solutions Performance Monitor Counters Memory –Page Reads/sec –Page Writes/sec –Page Input/sec –Page Output/sec Network Interface –Bytes Received/sec –Bytes Sent/sec –Bytes Total/sec –Current Bandwidth –Output Queue Length Objects –All Paging File –All Physical Disk – set ‘disk perf – y’ in DOS and reboot –% Disk Read Time –% Disk Write Time –% Idle Time –Avg Disk Bytes/Read –Avg Disk Bytes/Transfer –Avg Disk Bytes/Write –Avg Disk Queue Length –Current Disk Queue Length Process –% Privileged Time –% Processor Time –% User Time Processor –% Privileged Time –% Processor Time –% User Time

Edgewood Solutions Performance Monitor Counters Server Work Queues –Active Threads –Available Threads –Queue Length –Total Bytes/sec –Total Operations/sec SQLServer:Access Methods –Full Scans –Page Splits/sec –Table Lock Escalations/sec SQLServer:Cache Manager –Cache Hit Ratio - _Total –Cache Pages - _Total SQLServer:Databases –Transactions/sec SQLServer:General Statistics –Logins/sec –Logouts/sec –User Connections SQLServer:Locks –Number of Deadlocks/sec

Edgewood Solutions SQL Server Profiler Overview – Micro view of all SQL Server transactions saved to a log file or database table Filters – Ability to capture a subset of the transactions based on the transaction type, user, application, etc. Concerns – High system overhead

Edgewood Solutions SQL Profiler Event Data Cursors –CursorOpen –CursorExecute –CursorClose Errors and Warnings –Hash Warning –Missing Column Statistics Locks –Lock:Deadlock –Lock:Timeout TSQL –Unprepare SQL Parallelism –Degree of Parallelism – All Counters –Execution Plan –Show Plan All –Show Plan Statistics –Show Plan Text Stored Procedure –SP:Starting –SP:Completed –SP:Recompile –SP:StmtCompleted –SP:StmtStarting

Edgewood Solutions Query Analyzer – Query Plan Overview – Ability to graphically review the query execution plan

Edgewood Solutions SQL Server Objects ObjectFunctionality sp_who2Current system processes sysprocessesSystem table with processes sp_lockCurrent locks by spid sp_configureSQL Server configurations fn_get_sqlSnapshot of processes fn_virtualfilestatsI\O statistics for each database file SHOWCONTIGObject fragmentation Trace flagsCapture additional information

Edgewood Solutions Common SQL Server Performance Problems

Edgewood Solutions High CPU Utilization Identification –Guess – Task Manager figures –Hunt – Perfmon counters –24x7 – CPU usage by time, statement Resolution –Add additional CPUs –Identify statement(s) with high CPU –Move processes to another server or to off peak times

Edgewood Solutions High Disk I/O Identification –Guess – Disk drive lights or drive churning –Hunt – Avg Disk Queue Length, % Disk Time –24x7 – Review IO wait types and consumption Resolution –Add additional physical drives –Separate tables, indexes, file groups –Separate databases on physical disks –Appropriate RAID (database 1, 10, 5 - log 1) –Add additional indexes and/or re-index tables

Edgewood Solutions Poor Performing Statements Identification –Guess – User perception and input –Hunt – Profiler statement analysis –24x7 – Statements by resource, time, user Resolution –Review database design and query plans –Review table access order for JOINs –Recommend indexes based on data access –Short transactions with regular commits

Edgewood Solutions The Index Impact Identification –Guess – User perception and input –Hunt – Review query plans for entire application –24x7 – Index recommendations Resolution –Use Index Tuning Wizard –CRUD chart to determine needed indexes –Review code to determine columns in JOIN, WHERE, ORDER BY, GROUP BY, etc clauses –Leverage correct index based on needs –Maintain indexes and statistics per object

Edgewood Solutions Unknown SQL Server Changes Identification –Guess – Broken application –Hunt – Query sysobjects –24x7 – Schema change report Resolution –Appropriate security based on duties –Solidified change management process –Open communication among the team

Edgewood Solutions SQL Server Trending Identification –Guess – Change in user complaints –Hunt – Perfmon and Profiler changes –24x7 – Performance metrics over time Benefits –Proactive approach for future planning –Justification for hardware and software –Capacity planning

Edgewood Solutions Training Auditing Planning Integration Customer centric solutions with beneficial results Couple products and services for a complete solution Edgewood Offerings

Edgewood Solutions Additional Resources Additional Performance Tuning Recommendations –Veritas’s Indepth for SQL Server –Idera’s Diagnostic Manager Edgewood Offerings –Reach the Performance Tuning Pinnacle –Evaluation Software –Additional Resources

Edgewood Solutions References 1.What’s New in 6.5.ppt – Veritas Corporation – Accessed Edgewood Solutions.ppt – Veritas Corporation – Accessed Gartner Research Note: P – Accessed DISA-APM Overview.ppt – Veritas Corporation – Accessed bin/stories.pl?ACCT=SVBIZINK3.story&STORY=/www/story / / &EDATE=WED+Nov ,+09:01+AM - Accessed

Edgewood Solutions Summary and Thank You! Performance tuning… –An on-going process for the entire life cycle –Difficult and time consuming –Requires people, processes and technology Thank you! Questions?