Presentation is loading. Please wait.

Presentation is loading. Please wait.

Configuring SQL Server

Similar presentations


Presentation on theme: "Configuring SQL Server"— Presentation transcript:

1 Configuring SQL Server
Mission Critical Scalable Deployments Suresh B. Kandoth Microsoft – Sr. Escalation Engineer

2 Session Objectives And Takeaways
Target systems High-End CPUs / NUMA Large memory footprints High transaction rates Things you can do today File Configuration Trace Flags Memory Configuration sp_configure Windows settings SQL Server 2016 Changes Best Practices KB Article 2 | 12/28/2018 | Get more throughput from your systems

3 I/O and Database File Settings
RG - IO Data Files (MDF/NDF) Growth Percent MB Instant File Initialization SE_MANAGE_VOLUME Tempdb Number of Files Startup Trace Flags 1118 & 1117 Local Fast Storage In-Memory replacement non-durable Buffer Pool Extension File sizing X of ‘max srv memory’ Fast storage on all nodes Config improvements [SQL 2014 SP ] Snapshot Files / Sparse Fragmentation Latest OS Large File Record Segment KB FORMAT /L ReFS Same Speed as LDF Filestream 8.3 naming Last Updated Time Garbage Collection 3 | 12/28/2018 | Good configuration – less pagers & no night calls

4 Transaction Log Configuration
VLF initialization [0x00 or 0xC0 stamp] # of VLF [Recovery & Restore perf] VLF size change in SQL 2014 File settings 512 bytes, 4K, 512E Log shipping, High Availability [KB ] Flush boundary (R)ead-(M)odify-(W)rite behavior Sector size 4 | 12/28/2018 | Log performance is very critical

5 Latest OS NUMA Improvements
Memory Configuration -T8048 for CMemThread Binding Numa In Registry Vendor Guidance Numa Affinity Max Server Memory Lock Pages Large Pages Compatibility 5 | 12/28/2018 | Memory management isn’t that complicated

6 Plan Cache Other Caches Cache Configuration Increase Size of Cache
Startup Trace Flag 8032 Increase Bucket Count of Cache Startup Trace Flag 174 Configuration Options Optimize for Adhoc workload Forced Parameterization Other Caches Security Token Cache Access check tokens Access Check Cache Bucket Count Access Check Cache Quota Login, User and Context tokens Trace Flag 4618 & 4610 Log Pool Cache Startup Trace Flag 9024 to partition pmo Startup Trace Flag 9023 to limit size CU fixes for leak & cache management 6 | 12/28/2018 | Take care of these caches well and they will take care of you

7 Other Scalability Considerations
Download center Why Latest SP + CU Spatial PLE Eager Writes Cache contention DBCC changes VAS problems RG fixes Database Lock Partitioning Spatial Enhancements Query Optimizer Changes Activate QFE (Trace Flag 4199) Autostats Threshold (Trace Flag 2371) Table variable recompile (Trace flag 2453) 7 | 12/28/2018 | The latest build is the greatest !

8 Triple Check Before Upgrade
Fix Levels, SPs and CUs Trace Flags Configuration Settings Firewall Service Accounts and Settings 8 | 12/28/2018 | Do not leave anything behind, it will haunt you !

9 Configure SQL Server on IaaS/VM
Use minimum Standard Tier A2 for SQL Server VMs. Keep the storage account and SQL Server VM in the same region. Disable Azure geo-replication on the storage account. Avoid using operating system or temporary disks for database storage or logging. Avoid using Azure data disk caching options (caching policy = None). Stripe multiple Azure data disks to get increased IO throughput. Format with documented allocation sizes. Separate data and log file I/O paths to obtain dedicated IOPs for data and log. Enable database page compression. Enable instant file initialization for data files. Limit or disable autogrow on the database. Disable autoshrink on the database. Move all databases to data disks, including system databases. Move SQL Server error log and trace file directories to data disks. Apply SQL Server performance fixes. Setup default locations. Enable locked pages. Backup directly to blob storage. Leverage Buffer Pool Extension on VM with SSD Configure tempdb on SSD when available 9 | 12/28/2018 | Footer Goes Here

10 Diagnostics Best Practices
PssDiag SQL Nexus Sqldumper WPR WPA System Monitor Windows Event Logs SQL Error logs Cluster Logs System Health Session Ring buffers Extended Events 10 | 12/28/2018 | Footer Goes Here

11 Hot Spot Investigation - Extended Events
Configure sessions Actions to Capture Partitioning & Memory Filters and map values Process XEvent Data SSMS aggregate/group/filter Call stack requirements Changes in future Reader, Writer, Sorting Duration & Time Drift Incorrect Information Stability 11 | 12/28/2018 | Footer Goes Here

12 Changes In SQL 2016 TempDB auto-config Memory Object auto-partition
Query compilation robust Parallel redo Multiple Log Writers soft NUMA auto-config Schema Changes online Partition Management Always On AG Backup & Restore progress Query Progress easy identify Integrity Checks speed up Query Execution finer control Recovery progress tracking 12 | 12/28/2018 | Footer Goes Here

13 Additional references
BPE enhancements in SQL Server 2014 SP1 Sparse file changes and fixes Virtual log file recommendations and changes Plan cache changes Statistics update threshold Table variable recompile Query Optimizer changes 13 | 12/28/2018 | Footer Goes Here


Download ppt "Configuring SQL Server"

Similar presentations


Ads by Google