Download Flying Through the Clouds Performance Tuning in Azure

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
Flying Through the Clouds
Performance Tuning in Azure
Joey D’Antoni
26 September 2015
Modernizing The Data Platform
27-29 August 2015. NIMHANS Convention Centre, Bangalore, India.
Joey D’Antoni
• 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
• Principal Consultant, Denny Cherry and Associates
• MSCE, Business Intelligence, Database Administration
• He wants you to make sure you can restore your data
Joeydantoni.com
Thanks to our platinum sponsors :
3 | PASS SQL Saturday – Holland - 2015
Thanks to our silver and gold sponsors :
4 | PASS SQL Saturday – Holland - 2015
Agenda
Performance Tuning Saves Money
Understanding SQL Database Performance
IaaS Performance
Storage and Networking
Welcome to SQL DB
One of the earliest Azure offerings (SQL Azure)
Originally a subset of both T-SQL language and SQL engine
Now nearly code complete with SQL Server
Some features are ahead of current release (SQL 2014)
Benefits of SQL DB
Ease of
deployment
Simplicity of
management
Scale up and
scale out
options
Flexibility
How I TUNE a SERVER
MY METHODOLOGY
Check Server
Configuration
Tune Queries
Look in Plan
Cache
Read Error
Log
Look at Wait
Stats
8
Performance Bottlenecks
I STOLE THIS FROM TOM
CPU
Disk
Memory
Network
Blocking/Locking
© 2015 SOLARWINDS WORLDWIDE,
9
Cost Model
Not CALs, No Cores, No License Fees
Server / Database
Bandwidth
Data Out - Data in is FREE!
11
SQL Database DTUs
Database Throughput Unit (DTUs)
• Measurement of relative performance
• Blended measure of CPU, memory and Ios.
• DTUs are orders of magnitude
Azure SQL Database Benchmark
SQL Database Service Tiers and Performance
Levels
Basic
Standard
• S1—934 Transactions Per Minute
• S2—2750 Transactions Per Minute
• S3—5100 Transactions Per Minute
Premium
• P1—105 Transactions Per Second
• P2—228 Transactions Per Second
• P3—735 Transactions Per Second
New Performance Options
So What Does This Cost?
Azure SQL DB Management
Management features have been limited
Past--No way to gather query execution plans
Some for security through obscurity
Slowly adding Dynamic Management Views
Extended Events
DMVs
Expose metadata about
system performance
and operations
A subset of what is
available in SQL Server
Most missing views are
related to OS and
server management
Extended Events
Replacement for
SQL Profiler
Not
completely
rolled out yet
Collect
execution
plans from
Azure SQL DB
Challenges With Azure DB
I/O
Performance
Space
Management
Multi-tenant
scenarios
Bandwidth
I/O Performance and Space
Management
Optimize Data Types
Use Compression Aggressively
On Premium Tier consider using clustered columnstore
Bandwidth
Minimize result sets—perform aggregations in database
Keep application services close to data
Consider caching reports
Try to eliminate ad-hoc reporting
Other Keys to Performance
Consider application tier caching
Query Batching
Functional Partitioning
Choosing an Initial Service Level
Choose the lowest level to
start
Monitor performance
carefully
Resizing is online
operation
Monitoring Performance
Understand Peak CPU, Memory, IO
Concurrency
Need for low latency
Resource Use
Sys.resource_stats
Aggregated every 5
minutes
MSDN Performance Guide
Tuning Your Application
Reduce the
“chattyness”
of your
applications
Very
intensive
monolithic
workloads
Nonoptimized
queries
Databases
with
concurrency
issues
Elastic Database Pools
Define the pricing tier
and databases to include
Pool dynamically adjusts
resources to peak DTUs
Azure Infrastructure as a Service
Azure is really cool, really big VM farm
It should mostly be treated and tuned as such
Most performance problems are IO related
Understand your workload and have good baselines
Network Bandwidth
The bandwidth to your storage depends on the size of your VM
The bigger your VM, the more bandwidth you have
This ties to storage—only DS machines are eligible for premium
storage.
Use Regional VNets to colocate app and DB tier
Disk Considerations for Performance
Multiple Disk Devices—each disk device can do 62.5 IOPS (64k)
Premium Storage—a necessity for a busy server
• Starts with 400 IOPs (64k)
• Can go up to 6250 IOPs (64k)
Don’t use caching
Use D: (which is always temporary SSD) for TempDB space
Storage Spaces
You can use storage spaces to stripe across volumes to get IOPs
Stripe Size 64k for OLTP and 256k for OLAP workloads
Try to avoid auto-growth events
http://bit.ly/AzureSQLPerf
Summary
Use the tools and metadata MS provide to help optimize
your solutions
Cloud architecture is different—think about ways to
minimize I/O and network chattiness
VMs do offer good performance—but at a cost
Please review the event and sessions
 http://www.sqlsaturday.com/434/eventeval.aspx
 http://www.sqlsaturday.com/434/sessions/sessionevaluation.aspx
35 | PASS SQL Saturday – Holland - 2015
Thank you
for your time!
Modernizing The Data Platform
Connect us with us:
@SQLServerGeeks
facebook.com/SQLServerGeeks
facebook.com/groups/theSQLGeeks
www.SQLServerGeeks.com
[email protected]