SQL Storage Fundamentals for Azure IaaS

Slides:



Advertisements
Similar presentations
Big Data Working with Terabytes in SQL Server Andrew Novick
Advertisements

Russ Houberg Senior Technical Architect, MCM KnowledgeLake, Inc.
Windows Azure Migrating SQL Server Workloads Speaker Title Organization.
Key Perf considerations & bottlenecks Windows Azure VM characteristics Monitoring TroubleshootingBest practices.
Windows Azure Conference 2014 Designing Applications for Scalability.
DBI313. MetricOLTPDWLog Read/Write mixMostly reads, smaller # of rows at a time Scan intensive, large portions of data at a time, bulk loading Mostly.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
© 2011 IBM Corporation Sizing Guidelines Jana Jamsek ATS Europe.
Tweak Performance and Improve Availability of your Microsoft Azure VMs Rick
Honest Bob’s Cube Processing Bob Duffy Database Architect Prodata SQL Centre of Excellence 18 th July, 2014.
Load Testing Analysis Services 30 th march 2012 Bob Duffy Database Architect Prodata SQL Centre of Excellence.
Strategies for Working with Texas-sized Databases Robert L Davis Database Engineer
27-29 August NIMHANS Convention Centre, Bangalore, India. Modernizing The Data Platform Flying Through the Clouds Performance Tuning in Azure Joey.
Rick Claus Architect like a PRO for Performance and Availability of your Microsoft Azure VMs ARC43 6.
Deploying SQL Server With Microsoft Azure Virtual Machine Balakrishnan Shankar, Microsoft Based on actual customer experiences Based.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
When Good Design Goes Bad Bob Duffy. SQLSaturday #467 Sponsors.
Honest Bob’s Cube Processing Bob Duffy Database Architect.
Indexing strategies and good physical designs for performance tuning Kenneth Ureña /SpanishPASSVC.
SQL 2012 – Always On Deep Dive Bob Duffy Database Architect Prodata SQL Centre of Excellence 11 th April 2013.
Migrating to Azure and the Cloud Bob Duffy Database Architect Prodata SQL Centre of Excellence 28th Sept, 2013.
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Memory-Optimized Tables Querying at the speed of light.
System Storage TM © 2007 IBM Corporation IBM System Storage™ DS3000 Series Jüri Joonsaar Tartu.
When Good Design Goes Bad Bob Duffy Database Architect Prodata SQL Centre of Excellence March 2015.
EonStor DS 2000.
Get the Most out of SQL Server Standard Edition
Benchmarking like a PRO
Deploying SQL Server With Microsoft Azure Virtual Machine
Banco de Dados – Planejando um ambiente SQL Server de alta performance e missão crítica Vitor Fava Data Platform MVP.
SharePoint Solutions Architect, Protiviti
Hitting the SQL Server “Go Faster” Button
Section 6: SQL Server on IaaS Best Practices
Matching Storage Spaces Direct Configurations to Your Workload
Very Large Databases in your future
Data Warehouse in the Cloud – Marketing or Reality?
Windows Azure Migrating SQL Server Workloads
Installation and database instance essentials
Design and Implement Cloud Data Platform Solutions
BRK3310 Azure IaaS Design & Performance Considerations - Best Practices & Learnings from the field Daniel Neumann TSP – Azure Infrastructure at Microsoft.
Optimizing SQL Server Performance in a Virtual Environment
02 | Design and implement database
SQL Storage Fundamentals for Azure IaaS
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
The Top 5 SQL Server Mistakes
Azure SQL Data Warehouse Scaling: Configuration and Guidance
Upgrading to Microsoft SQL Server 2014
VNX Storage Report Project: Sample VNX Report Project ID:
SQL On Azure Parikshit Savjani, Sr. Premier Field Engineer.
Microsoft Build /9/2018 5:08 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
SQL Storage Fundamentals for Azure IaaS
Hitting the SQL Server “Go Faster” Button
Configuring SQL Server
In-Memory OLTP (IMOLTP) What Can It Do For Me?
Real world In-Memory OLTP
Proving Hardware Bottlenecks &
SQL 2014 In-Memory OLTP What, Why, and How
SQL Server performance tuning on Azure IaaS
Turbo-Charged Transaction Logs
Very large Databases in your future Eric Peterson.
SQL Server performance tuning on Azure IaaS
Configuring SQL Server
Transaction Log Internals and Performance David M Maxwell
Hybrid Power BI With the on Premise Data Gateway
Transaction Log Performance Tuning
Bob Duffy 27 years in database sector, 250+ projects
Disaster Recovery Done Dirt Cheap Founder Curnutt Data Solutions
The Database World of Azure
Presentation transcript:

SQL Storage Fundamentals for Azure IaaS Bob Duffy, MCA, MCM, MVP

Bob Duffy 22 years in database sector, 250+ projects SQL Server MCA, MCM, MVP SSAS Maestro Senior Data Platform Consultant with Microsoft 2005-2008 Database Architect at Prodata SQL Centre of Excellence http://blogs.prodata.ie/author/bob.aspx bob@Prodata.ie

Agenda Azure Storage Fundamentals Azure Sizing and Throttling Optimising Storage Configuration Storage Requirements and Capacity Planning SQL Configuration Storage Benchmarking

What is Azure Storage Takeaways: Dont worry about RAID 1+ Geo redundancy/replication Takeaways: Dont worry about RAID 1+ Dont do geo-replication for SQL IaaS Write penalty (expect WRITE_LOG) LRS ZRS GRS RA-GRS Total Copies 3 6 SLA 99.9% 99.99% read 99.9% write Warning: No write ordering on geo replication

Storage Choices ? VHD on HDD VHD on SSD Direct to Blob Store Throughput MB/Sec 60 200 Max IOPS 500 5,000 Latency 10-40ms <5ms ??? Cost per TB/Month € 17.28 113.99 VM SLA None 99.9% CREATE DATABASE MyAzureDB ON ( NAME = MyAzureDBData, FILENAME = 'https://[url]/sqldata/azureData.mdf' ) LOG ON ( NAME = MyAzureLog, FILENAME = 'https://[url]/sqldata/azureLog.ldf') https://azure.microsoft.com/en-us/support/legal/sla/virtual-machines/v1_6/

Storage Host Caching Discuss – why do not care so much about storage cache? Best Practise https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance

VM Storage Limits (SSD)

SQL IO Characteristics (AVG IO Size) Workload Type IO Size Log Writes Sequential Up to 60k Checkpoint Random Up to 256k Table Scan 64-512K (on EE) Index Seek 8k 64k (read ahead) Backup 64k-4MB 500 iops @8k = 4MB/sec 500 iops @64k = 31MB/sec 500 iops @256= 125 MB/Sec 80,000 iops @ 64k = 5GB/Sec Conclusion – ignore iop limit on ssd vms and worry about throughput !

VM Throughput Limits DS-Series, ACU: 210-250 Cores RAM VM “IOPS” Max MB/sec Effective IOPS@64k VM Cost €/Month in sql EE 2 14 6,400 96 1,536 119 4 28 12,800 192 3,072 237 8 56 25,600 384 6,144 476 16 112 50,000* 768 12,288 954 20 140 64,000 960 15,360 1,190 48 MB/Sec per core GS-Series, ACU: 180 - 240 2 28 5,000 125 2,000 439 4 56 10,000 250 4,000 878 8 112 20,000 500 8,000 1,757 16 224 40,000 1,000 16,000 3,514 32 448 80,000 32,000 6,267 €1.23 euro per MB/Sec 62.5 MB/Sec per core https://docs.microsoft.com/en-us/azure/storage/storage-scalability-targets

The Three Levels of Throttling STORAGE ACCOUNT 20,000 iops or 1,250 MB/Sec 4 Core VM 386 MB/Sec 8 Core VM 768 MB/Sec 32 Core VM 2,000 MB/Sec 1TB SSD 200 MB/Sec 1TB SSD 200 MB/Sec 1TB SSD 200 MB/Sec X 2 X 4 X 10 Also 10 Gbps https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#storage-limits

Managed Disks Eliminates limits of storage account ;-) P10 P20 P30 Bottleneck @64k Eliminates limits of storage account ;-) P10 P20 P30 Disk Size (GB) 128 512 1,204 IOPS 500 2,300 5,000 Throughput 100 150 200 Effective Throughput 8 143 200+ (313) Cost €/month 18 68 125 Cost € per MB/Sec 2.25 0.46 0.625 Cost € per TB 144 136 P10 is only 8 MB/Sec

An Example of designing storage for elasticity We need a 3TB SQL but want to “max” storage performance on an 8 core server and burst up to 20 core at night 8 Core VM 384 MB/Sec 1TB SSD 200 MB/Sec 1TB SSD 200 MB/Sec 1TB SSD 200 MB/Sec 600 MB/Sec 20 Core VM 960 MB/Sec 512GB SSD 150 MB/Sec X 6 = 900 MB/Sec

Azure Portal Storage Configuration Wizard Advice: configure the disks yourself

Adding and Combining Disks Combine azure disks using storage spaces Interleave defaults to 256Kb (data warehouse) May need 64k (OLTP) set column count = number of physical disks For > 8 disks need to use powershell Adding disks to VMs $diskConfig = New-AzureRmDiskConfig -AccountType $storageType -Location $location -CreateOption Empty -DiskSizeGB $diskSizeGB $vm = Add-AzureRmVMDataDisk -VM $vm -Name $myDiskName -CreateOption Attach -ManagedDiskId $dataDisk1.Id -Lun $i Creating storage spaces New-StoragePool –FriendlyName SQLVMStoragePool2 –StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk -CanPool $True) New-VirtualDisk -StoragePoolFriendlyName SQLVMStoragePool2 -FriendlyName SQLVMVirtualDisk2 ` -Interleave 256KB -NumberOfColumns 1 -UseMaximumSize -ResiliencySettingName simple

The Magnificent Seven Capacity Planning Metrics Perfmon dm_io_virtual_file_stats IOPS Logical Disk\Reads/Sec Logical Disk\Writes/Sec Y OLTP, DW, Mixed Logical Disk\ Avg Disk Bytes/Read Kinda Throughput Logical Disk\Read Bytes/Sec Size of data, log, tempdb MSSQL$:Databases(x)\Data File Size (KB) MSSQL$:Databases(x)\Log File Size (KB) % of workload in temp Derived RW Ratio Latency Logical Disk\Avg Disk Secs/Read [sys].[dm_io_virtual_file_stats] https://sqlperformance.com/2013/10/t-sql-queries/io-latency

Capacity Planning Tools Tools to capture metrics Tools to analyse metrics https://pal.codeplex.com/ https://blogs.msdn.microsoft.com/analysisservices/2011/06/14/analyzing-performance-data-in-powerpivot/

SQL Configuration - Tempdb The usual practices apply Pre-size and set growth on tempdb Use multiple files Only use T1117 and T1118 before SQL 2016 Tune to lower tempdb utilisation Should we use Local SSD – Maybe ;-) Side effect of permissions/startup issues Can reduce latency on write intensive tempdb Only one local disk and limited size

SQL Configuration - Data and Log Files Create Two disk pools (Log, data+tempdb) Best for isolation and recovery Does log NEED dedicated IOPS One large disk pool (one logical drive) Best for maximising throughput Separate Logical drives (F: and L:) Compromise Normal File and Filegroup apply in IaaS Avoid use of primary group Use File groups for data warehouses: Partial recovery Reduce fragmentation => increase IO size Hot/cold data=>one per table=> one per partition Use multiple files to improve concurrency in OLTP Set proper file sizing and growth Data Log Data + Log Data Log

SQL Configuration – Other Settings to improve Storage Performance Lock Pages in Memory Instant File Initialisation Use these features as appropriate Page Compression Column Store Indexes Delayed Durability In Memory Tables Stretch Tables

Benchmarking Use diskspd.exe to validate throughput and or IOPS Consider making a IO saturation chart Run diskspd as ever increasing thread and outstanding IO If you are lazy use CrystalDiskMark http://blogs.prodata.ie/post/IOPS-Planning-for-SQL-Server-in-Azure-IaaS.aspx

8 Core single 1TB Disk

8 Core single 1TB Disk x 2

16 Core VM – 4 x 1TB disks

Lessons Learned Worry more about throughput than IOPS Choose your own disks to get target throughput Build your own disk pools Plan your VM Size based on throughout needed Wish List for Azure Provisioned IOPS! Fixing the bugs with tempdb on local SSD

Meet me at the Community Zone Thank You ! – 4 x 1TB disks Meet me at the Community Zone After this session, you can speak with me in the Community Zone WE MIGHT Discuss additional questions Review parts of my session in more detail Network Take selfies…  Play Jenga and drink beer IMPORTANT : ONLY SHOW THIS SLIDE IF YOU HAVE COMMITED TO BE AT THE COMMUNITY ZONE

Please evaluate all sessions! QR / LINK on posters and in program

THANKS to all Sponsors! EVENT SPONSORS EXPO SPONSORS EXPO LIGHT SPONSORS