Geek Sync I Dealing with Bad Roommates - SQL Server Resource Governor

  • View
    62

  • Download
    1

Embed Size (px)

Text of Geek Sync I Dealing with Bad Roommates - SQL Server Resource Governor

  1. 1. Dealing with Bad Roomates SQL Server Resource Governor Joey DAntoni 20 July 2015
  2. 2. Joey DAntoni Joey has over 15 years of experience with a wide variety of data platforms, in both Fortune 50 companies as well as smaller organizations He is a frequent speaker on database administration, big data, and career management He is the co-president of the Philadelphia SQL Server Users Group MSCE, Business Intelligence, Data Platform He wants you to make sure you can restore your data Joeydantoni.com
  3. 3. Agenda The Problems with sharing your SQL Servers An Introduction to Resource Governor How to Implement Resource Governor Demo
  4. 4. Bad Roomates
  5. 5. Bad Roommates in SQL Server Is this your SQL Server? Or is this your SQL Server?
  6. 6. Other Applications
  7. 7. Poll Question Tell us about your SQL Server environment
  8. 8. Resource Management < SQL 2008 SQL Server Memory, CPU, Threads Resources
  9. 9. Introducing Resource Governor Introduced in SQL Server 2008 Enterprise Edition Only Controls CPU and Memory Resources (2008-2012) Controls CPU, IOPs, and Memory Resources (2014)
  10. 10. Why Use Resource Governor? Prioritization between apps and users Limit runaway queries Give control back to the DBA
  11. 11. Resource Governor Concepts Resource Pool Manages server resources Workload Group Aggregates similar session requests Classifier Function Classifies connection to its workload group
  12. 12. Resource Governor Workloads Split Workloads Application Name Login Not Database Per Request Limits Max Memory % Max CPU Time Grant Timeout Resource Monitoring SQL Server Memory, CPU, Threads Resources Admin Workload OLTP Workload Report Workload
  13. 13. Importance Workloads have importance labels Low Medium High Adjusts relative importance to workloads for resource allocation
  14. 14. Resource Governor Pools Resource Pool: A subset of database resources Controls Minimum CPU % Maximum CPU % Minimum Memory % Maximum Memory % Workload Group Controls Importance Maximum Requests CPU Time (sec) Memory Grant % Grant Time Out MaxDOP Min and Max IOPS Per Volume
  15. 15. Poll Question: Have you used resource governor?
  16. 16. Classifier Function User defined scalar function to classify incoming connections to resource group One per instance Does not apply to internal workload group Evaluated for every new connection Should be in master database If no function all connections go to default group
  17. 17. Resource Governor Overview
  18. 18. Limitations Internal Pool always wins Default Pool is always there No resource contention=no resource governing Importance is only weight Does not recognize waiting tasks No TempDB limits
  19. 19. Demo Implementing and Using Resource Governor
  20. 20. Monitoring Resource Governor Metadata CVs: sys.resource_governor_resource_pools sys.resource_governor_workload_groups sys.resource_governor_configuration Running value DMVs: sys.dm_resource_governor_resource_pools sys.dm_resource_governor_workload_groups sys.dm_resource_governor_resource_pool_volumes
  21. 21. Use Cases SQL Server Consolidation Servers with mixed OLTP and Reporting Workloads Using SharePoint and Dynamics with other databases
  22. 22. Other Limitations Database Engine OnlyNothing for SSAS, SSRS, SSIS Limit of 18 user- defined resource pools Many components (Database Mail, linked server queries, XPs) are not subject to resource governor No IO throttling until SQL 2014
  23. 23. Questions