Presentation is loading. Please wait.

Presentation is loading. Please wait.

What We’ll Cover Today Introductions Poll SQL Performance Goals

Similar presentations


Presentation on theme: "What We’ll Cover Today Introductions Poll SQL Performance Goals"— Presentation transcript:

1 Avoid the Top 10 SQL Server Configuration Mistakes for Performance Success

2 What We’ll Cover Today Introductions Poll SQL Performance Goals
Best Practice vs. Real World Top OS Misconfigurations Summary Q&A

3 Let’s Meet. Ted Theodoropoulos Ben DeBow Founder & President
Specialties / Focus Area Project Leadership Custom Application Development Application Modernization Systems Integration SharePoint Development SharePoint Design & Branding Ben DeBow Founder & CEO Specialties / Focus Areas Scaling Systems Performance Tuning Private/Public Clouds Infrastructure Design High Availability/Disaster Recovery Health and Efficiency Consolidated Architectures Deep-Dive Troubleshooting BBQ - Judge BBQ - Smoking Out @acrowire @BBQSQL 3 |

4 We are Legal IT Experts. SharePoint App Dev Envisioning SQL Server
We help law firms leverage the latest technologies and methodologies to meet business objectives through: SharePoint Custom Development Portal Branding/UX Platform Migration Managed Services Governance Info Architecture SharePoint MD App Dev App Modernization Greenfield App Dev (Desktop/Mobile) ASP.NET MVC HTML5/JavaScript/CSS Microsoft Azure SQL Server DB/RS/IS System Integration Envisioning IT Project Planning Cost Estimate Project Charter Solution Concept Risk Assessment Capabilities Overview Wireframes & Surveys Style Tiles & Mockups SQL Server Architecture SQL MD Cloud Data Strategy Migrations/Upgrades Performance Tuning Managed Services Scaling SQL Server Troubleshooting

5 Let’s Poll. What is your current role? DBA Developer Infrastructure
Other

6 SQL Performance Goals When you install SQL Server, what is the goal?
Scalability Stability Reliability What SQL Server configurations will enable you meet your goals? What operating system (OS) configurations are important for SQL Server installations?

7 Best Practice versus Real World
Reviewed thousands of SQL Servers instances What did we find? DBAs only manage 80% of their universe 20% hidden under desktops and managed by shadow IT Multiple base OS and SQL configurations The hardware and OS is not customized to support SQL Server New servers not configured the same Identified OS and SQL configurations that can increase the stability, reliability and performance of SQL Server What are best practices? So many sources of information today, it is hard to tell but at the end of the day, what works for you. What are your configuration today? Need to communicate with the server teams, SAN and networking to help create the base SQL Server infrastructure. SQL needs a different configuration than Exchange or file servers. Take disk for example, the block size, response times and usually the capacity requirements are vastly different that other applications.

8 Top OS Misconfigurations
Windows 2008 R2 default Power Plan is “Balanced Power” Impact: Turns OFF server cores when not being used Cores conserve energy by the CPU frequency Recommendation: Change to High Performance plan **Verify the system BIOS is configured to support the High Performance plan The OS is important because there are several configuration and hardware choices that impact SQL and your goals.

9 Top OS Misconfigurations
Policies not set or set for the wrong service account “SQL instant file initialization” “Lock Pages in Memory” Impact: SQL Server file growths take longer while the files are zeroed out SQL Server memory can be Paged out by the OS Recommendation: Grant the SQL Server service account the following policies: “Perform volume maintenance tasks” Some simple settings that benefit sql server. We will show later in the presenation the impact these can have on the growth operations.

10 Top Installation Misconfigurations
Only using SQL Server Database engine but SQL Reporting and Analysis Services is installed and running What other 3rd party applications or windows features are installed? Impact: Use additional server resources, I/O, memory and CPU Increase security attack vector Need to patch and support Recommendation: Only install required features and applications Know what is installed, running and how it is configured. Many times the windows or server teams install many other applications including virus protection onto the server. Understand what is installed and how many resources it is using. Make sure virus protection is excluding the sql dirs. If there are multiple instances, what is the max memory set to? Are they both CPU intensive?

11 Top Installation Misconfigurations
Uninstall if the feature is not required OR Disable if the services are not used

12 Top SQL Misconfigurations
SQL system and user databases located on the C drive or other lower performing drives Impact: The I/O responses times are slower and impact the performance of SQL Server Recommendation: Place the SQL system and user databases on faster disk Master, model, msdb place with other data files (~<20ms) Transaction log drive needs the faster response times (~< 10ms) TempDB should be isolated due to the higher resource requirements (~<20ms) Big topic so lets start with the high level rule. Do not put DBs on the system partition. Cannot easily grow the DBs bring down the whole server if you run out of space on the system partition Slow disks Talk about disk performance and place Compare today’s SANs and DASD

13 Top SQL Misconfigurations
Default Growth Properties 1MB for data files 10% for transaction log files Impact: Bigger the file, bigger the growth, longer users waits INSERTS, UPDATES and DELETES wait until the file growth is done Recommendation: Benchmark growth operations on your disk Adjust the growth method and size for all data and log files Apply the default settings to the MODEL database Make sure the growth amount is not small or large Still not sure WHY sql still has these setting since data is ever growing and even the base DB size is a lot larger. But that is besides the point. 10% of a small number is small and 10% of a big number can be large Model DB – base DB Larger DBs most likely receive more data per second and therefore need larger growth increments – maybe 1GB versus 512mb Have the same settings for all files in a DB Proportional fill algorithm

14 Top SQL Misconfigurations
File Growth for 10MB – DASD Event Logical File Name Start Time Duration (ms.) Change In Size (MB) Log File Auto Growth Database 9/30/ :19:04 PM 2910 500.00 9/30/ :18:55 PM 3093 9/30/ :18:47 PM 2463 9/30/ :18:36 PM 3863 File Growth for 500MB – DASD 3 unique systems with different growth times Event Logical File Name Start Time Duration (ms.) Change In Size (MB) Log File Auto Growth Database 5/7/ :49:03 PM 23 10.00 5/7/ :48:17 PM Data File Auto Growth 5/7/ :48:02 PM 5/7/ :47:20 PM 43 Review the duration and compare the results Ask the server guy what type of disk exists behind the server Test yourself by creating a new, blank DB How busy is your system? Very important to PREGROW. File Growth for 500MB – SAN Event Logical File Name Start Time Duration (ms.) Change In Size (MB) Data File Auto Growth Database 2/2/2013 1:36:59 AM 56 1,024.00 2/2/2013 1:36:14 AM 46 2/2/2013 1:35:33 AM 96

15 Top SQL Misconfigurations
AutoShrink is “Enabled” or an automatic job shrinks specific files on a scheduled basis “Auto Update” or “Auto Create Statistics” is “Disabled” Impact: Increases fragmentation Costly operation both I/O and CPU Recommendation: Disable “AutoShrink” setting or processes Pre-grow the files and allow for 6 months of growth Monitor the % used and review the growth metrics Updated statistics yields better execution plans I understand the thought process behind the WHY people may have this set but lets talk about it. Costly operation Fragments the objects while moving the data pages around, uses server resources, uses resources when you have to grow again Sql server uses statistics to determine the best access path or execution plan How statistics work. Parse Normalize Review statistics and creates a exec plan

16 Top SQL Misconfigurations
Databases with multiple transaction log files on separate drives Impact: SQL Server does not stripe the I/O to multiple transaction log files concurrently like data files Additional space is allocated that can be used for other databases Recommendation: Each database should only have 1 transaction log file Size appropriately and pre-grow the file Sql only writes to a single tlog file Most likely larger files and if you have a DR scenario, will have to zereo the log files Higher VLFs – what they are and how they affect performance To remove the log file, run DBCC loginfo and wait until the STATUS = 2 in only the first file, then alter the DB Ongoing, Monitor the % tlog space used in perfmon

17 Top SQL Misconfigurations
SQL dynamic memory is set or SQL Server “Max Server Memory” is set to high Impact: OS and 3rd party processes memory may be paged out because the free physical memory is near 0 Recommendation: Set “Max Server Memory (MB)” Review the OS and 3rd party applications memory usage Review SQL Servers external memory requirements Setting SQL Server memory - Very important to know the systems total memory and how much memory the other processes are using. Do not set to high Look in perfmon or task mgr – free memory under physical memory SSIS and replication server, many extra processes are running – be conservative

18 Top SQL Misconfigurations
Untrusted constraints Constraints added without checking the existing data Impact: Performance impact because SQL has to validate the constraint Needs to validate the data as part of the transaction Recommendation: When adding or re-enabling constraints ALTER TABLE TableName WITH CHECK CHECK CONSTRAINT ConstraintName Verify existing CONSTRAINTs are TRUSTED

19 Summary Collect and analyze your existing SQL Server configurations
Create a base configuration for your environment Customize based on environment, workload and other critical factors Apply the base database configurations to MODEL Validate the servers OS configuration before you start to install SQL Server

20 Now You’re An Expert. You can optimize performance by avoiding these top 10 SQL Server configuration mistakes. Our goal is to supply you with relevant knowledge to help make this happen.

21 But, We're Still Here to Help.
Learn about SQL MD today and how our team of project experts and this defined process can ensure success for your next project.

22 Questions and Answers


Download ppt "What We’ll Cover Today Introductions Poll SQL Performance Goals"

Similar presentations


Ads by Google