04 | Performance and the Premium SKU Chris Auld | CTO – Intergen Limited, Azure MVP Greg Leake | Director, SQL Server Product Management
Module Overview Raw Performance vs Scale Scale Up and Scale Out in WASD Performance Principles
Point 1: Raw Performance vs Scale
Raw Performance Demo [Greg]
Point 1: Scale Up vs Scale Out Premium SKU
Available today, Premium with reserved capacity 4/30/2019 7:34 PM Available today, Premium with reserved capacity Two classes of cloud apps emerging Cost-effective & scalable: Web & Business editions deliver a managed database service for apps that have low demands or require cost-effective scale-out. Business-class: Premium edition delivers fixed reserved capacity for apps that need: Sustained resource demands Many concurrent requests Predictable latency More predictable performance DB 1 DB 2 DB 3 Web & Business Editions Shared Resources Reserved Resources Premium Edition DB 1 DB 2 DB 3
SQL Database Reserved Capacity Web & Business editions Primary Secondary Secondary Customer databases share hardware resources Workload demands vary by customer DB, and by day Unpredictable performance Premium edition w/ reserved capacity Primary Secondary Secondary Fixed amount of reserved capacity for SQL Database primary and 2 built-in replicas Ideal for business-class applications: have high peak loads support many concurrent requests require low latency Offered in two sizes for preview: P1 & P2 Primary Secondary Secondary Primary Secondary Secondary
SQL Database Scale Out Massive Scale Engage 1000s of nodes within the cluster 10 GB DB 10 GB DB 10 GB DB 10 GB DB 10 GB DB 10 GB DB Simplified Development and Administration Robust programming & connectivity model for creating dynamic applications 10 GB DB 10 GB DB 10 GB DB 10 GB DB 10 GB DB 10 GB DB 100 GB Database Simplified Multi-tenant Database Tiers Multi-tenancy provides great efficiencies by increasing density of tenants per database Applications don’t have to make a static decision about tenant placement 1,000 TPS 10,000 TPS
Point 1: Performance Principles
Some general principles Chunky not chatty Batch work Get all data at once Hand all writes back up at once. XML, Table Valued Params etc… Caching Minimize unnecessary reads How fresh does data for a web app really have to be? 1s? 10s? There are few physical levers to pull Be very sensitive to IO
Instrumenting your app TechEd 2013 4/30/2019 7:34 PM Instrumenting your app Snapshotting DMVs Collecting XEvents DB DB DB DB DW DB DB DB DB DB © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Other places to get info SQL Database Portal Query performance aggregates (from DMV) Connection activity including any throttle events (from sys tables) Execution plans Special wait stats SE_REPL_SLOW_SECONDARY_THROTTLE SE_REPL_COMMIT_ACK Call Support Need session info (see next session)
DMVs for Performance Monitoring Sys.dm_exec_requests Currently running queries Sys.dm_exec_query_stats Aggregate query performance Sys.dm_exec_query_plan Execution plan Sys.dm_db_wait_stats Database level wait stats “missing index” DMOs Possible indexes for performance
Additional Resources DBI 337 from TechEd 2013 Query Performance Tuning in WASD http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/ DBI-B337 DBI 330 from TechEd 2013 Cloud Optimizing T-SQL http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/ DBI-B330