Presentation is loading. Please wait.

Presentation is loading. Please wait.

October 11-14, Seattle, WA All the Magic Knobs Low Effort, High Return Tuning Cindy Gross Microsoft Certified Master : SQL Server Dedicated Support Engineer.

Similar presentations


Presentation on theme: "October 11-14, Seattle, WA All the Magic Knobs Low Effort, High Return Tuning Cindy Gross Microsoft Certified Master : SQL Server Dedicated Support Engineer."— Presentation transcript:

1 October 11-14, Seattle, WA All the Magic Knobs Low Effort, High Return Tuning Cindy Gross Microsoft Certified Master : SQL Server Dedicated Support Engineer (DSE) Microsoft Premier Field Engineering (PFE) Cindy.Gross@microsoft.com http://blogs.msdn.com/cindygross/ @SQLCindy

2 Why do we want magic? Have a good foundation – the magic knobs Minimum effort, maximum return Tuning individual queries is resource intensive 2 DBA-319-C | All the Magic Knobs

3 When you can’t tune individual queries…. Many consolidated databases Non-Tier 1 databases Databases you don’t understand or don’t control 3 rd party products Standards/Starting Points 3 DBA-319-C | All the Magic Knobs

4 Where is the Magic? Instance and database settings Hardware Windows configuration User rights Object settings that don’t require code changes Maintenance 4 DBA-319-C | All the Magic Knobs

5 What is our goal? Low effort, high impact choices DBA-319-C | All the Magic Knobs 5

6 Make it easy Run the SQL Best Practices AnalyzerSQL Best Practices Analyzer Run System Center AdvisorSystem Center Advisor Do what they recommend 6 DBA-319-C | All the Magic Knobs

7 Outside SQL Server 7 DBA-319-C | All the Magic Knobs

8 Power Savings Power option set to High Performance Power option Bios and Windows levels Uneven or oddly high CPU Can set back to balanced off hours 8 DBA-319-C | All the Magic Knobs

9 IO Fastest IO path(s) possible Disk partition alignment 64k block size Understand degree of isolation from other apps Understand tradeoff of many spindles vs. isolation Bottleneck = - load, +capacity, or ignore 9 DBA-319-C | All the Magic Knobs

10 Virtual Machines Set VM memory to avoid ballooning No over-committing Know where the VM does/can reside Evaluate tradeoff of disk types 10 DBA-319-C | All the Magic Knobs

11 Outside SQL Server Instant File Initialization on (small security risk) Instant File Initialization Windows patches applied Latest Windows storport, storage/SAN drivers, firmware, NIC drivers, MPIO Exclude SQL Server from filter drivers Reduce other apps on server Throw hardware at the problem 11 VDBA-319-C | All the Magic Knobs

12 Within SQL Server 12 DBA-319-C | All the Magic Knobs

13 Optimize for ad hoc workloads sp_configure setting in SQL Server 2008 and higher Reduces size of plan cache Caches only a stub for single use plans SELECT '===TotalSizeOfStubs', COUNT(*) AS NumOfPlanStubs, SUM(size_in_bytes) AS BytesOfAllPlanStubs FROM sys.dm_exec_cached_plans WHERE cacheobjtype = 'Compiled Plan Stub'; SELECT '===TotalSizeOfCompiledPlansUsedOnce', COUNT(*) AS NumOfCompiledPlans, SUM(size_in_bytes) AS BytesOfAllCompiledPlans FROM sys.dm_exec_cached_plans WHERE cacheobjtype = 'Compiled Plan' AND usecounts = 1; 13 DBA-319-C | All the Magic Knobs

14 Compression New in SQL Server 2008 – some editions Backup Data – row or page Uses more CPU, less memory and IO Transparent to the application 14 DBA-319-C | All the Magic Knobs

15 Memory Lock Pages in Memory (LPIM) Max Server Memory set to allow other apps/services enough memory Pagefile size generally irrelevant for SQL, though may be needed for other apps or kernel dumps 15 DBA-319-C | All the Magic Knobs

16 Database Sizing Pre-size data and log files Autogrow is a failsafe only Set autogrow increments big enough to happen once but small enough to be fast Alert on Autogrow occurrences Avoid shrink unless you will never grow again or are cleaning up VLFs Avoid Autoshrink 16 DBA-319-C | All the Magic Knobs

17 VLFs Virtual Log Files (VLFs) – boundaries within a physical log file View with DBCC LOGINFO “Too many” = slow restore, online/start, transactional replication, mirroring, CDC Shrink once, pre-size 17 DBA-319-C | All the Magic Knobs

18 Tempdb Multiple data files of the same size, one log file Enough data files (start with 8) to avoid contention, not so many to cause problems. Presize for peak periods of next X months, re-evaluate Fast IO subsystem Change file size if you add new features that use tempdb Monitor for approaching full, change in activity/size Performance tune user databases and applications Limit use of versioning or temp objects -T1117 for even file growth 18 DBA-319-C | All the Magic Knobs

19 Maintenance Rebuild Indexes Reorg Indexes Update Statistics (but not after rebuild) Auto update/create statistics Async update stats Backup frequency 19 DBA-319-C | All the Magic Knobs

20 Indexes Drop duplicates/redundancies Drop unused/rarely used Consolidate indexes Add “missing” indexes No heaps 20 DBA-319-C | All the Magic Knobs

21 SQL Server Patching Keep up to date We require service packs, we recommend Cumulative Updates (CUs) You may not know you’re affected by a bug that already has a fix Example: Trace Flag 4199 requires a certain build level 21 DBA-319-C | All the Magic Knobs

22 What magic tricks are in your hat? Power Savings = High Performance Smart Virtualization Enough Hardware Control other apps, filter drivers Optimize for ad hoc workloads = ON Compression = ON Set LPIM + Max Server Memory Pre-size files, avoid shrink and autogrow Fast Tempdb Proper Maintenance 22 DBA-319-C | All the Magic Knobs

23 Audience Tips and Questions Share your tips Questions? Cindy Gross Dedicated Support Engineer (DSE) Microsoft Premier Field Engineering (PFE) Cindy.Gross@microsoft.com http://blogs.msdn.com/cindygross/ 23 DBA-319-C | All the Magic Knobs

24 24 Session Code | Session Title Microsoft SQL Server Clinic Work through your technical issues with SQL Server CSS & get architectural guidance from SQLCAT Microsoft SQL Server Clinic Work through your technical issues with SQL Server CSS & get architectural guidance from SQLCAT Microsoft Product Pavilion Talk with Microsoft SQL Server & BI experts to learn about the next version of SQL Server and check out the new Database Consolidation Appliance Microsoft Product Pavilion Talk with Microsoft SQL Server & BI experts to learn about the next version of SQL Server and check out the new Database Consolidation Appliance Expert Pods Meet Microsoft SQL Server Engineering team members & SQL MVPs Expert Pods Meet Microsoft SQL Server Engineering team members & SQL MVPs Hands-on Labs Get experienced through self-paced & instructor- led labs on our cloud based lab platform - bring your laptop or use HP provided hardware Hands-on Labs Get experienced through self-paced & instructor- led labs on our cloud based lab platform - bring your laptop or use HP provided hardware Room 611Expo Hall6 th Floor LobbyRoom 618-620

25 Microsoft Certified Master

26 DBA-319-C | All the Magic Knobs 26 Winning with Kerberos Mon 10/10 8:30am-4:30pm Adam Saxton Pre-Con Breakout Sessions Inside TempDB DBA-500-HD Wed 10/12 1:30-4:30pm Bob Ward Getting your Mind Wrapped Around SQL Azure AZ-301-C Fri 10/14 1:00-2:15pm Evan Basalik “Denali” Performance Dashboard Reports DBA-215-C Fri 10/14 10:15-11:30pm Keith Elmore Boris Baryshnikov All the Magic Knobs DBA-319-C Thurs 10/13 3:00-4:15pm Cindy Gross Room 611 10/12 – 10/14 After Keynote Until 6:00pm…ish

27 Complete the Evaluation Form to Win! Win a Dell Mini Netbook – every day – just for submitting your completed form. Each session evaluation form represents a chance to win. Pick up your evaluation form: In each presentation room Online on the PASS Summit website Drop off your completed form: Near the exit of each presentation room At the Registration desk Online on the PASS Summit website Sponsored by Dell 27 Session Code | Session Title

28 October 11-14, Seattle, WA Thank you for attending this session and the 2011 PASS Summit in Seattle


Download ppt "October 11-14, Seattle, WA All the Magic Knobs Low Effort, High Return Tuning Cindy Gross Microsoft Certified Master : SQL Server Dedicated Support Engineer."

Similar presentations


Ads by Google