SQL Storage Fundamentals for Azure IaaS

Slides:



Advertisements
Similar presentations
SQL Consolidation Planning
Advertisements

MID309. This picture has been released into the public domain by its author, ChiemseeMan at the German Wikipedia projectpublic domainChiemseeManGerman.
Low Control | Low Maintenance Shared Lower cost Dedicated Higher cost High Control | High Maintenance Hybrid On premises Off premises SQL Server Physical.
SAP on windows server 2012 hyper-v documentation
SQL Server 2008 & Solid State Drives Jon Reade SQL Server Consultant SQL Server 2008 MCITP, MCTS Co-founder SQLServerClub.com, SSC
Insight Proprietary & Confidential. Do Not Copy or Distribute. © 2015 Insight Direct USA, Inc. All Rights Reserved. Insight Presentation Insight’s Tagline.
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.
© 2011 IBM Corporation Sizing Guidelines Jana Jamsek ATS Europe.
Scalability == Capacity * Density.
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.
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
Windows Azure For SQL Folk Bob Duffy Database Architect Prodata SQL Centre of Excellence
Making a Difference with Azure Storage Solutions Dudu Sinai.
When Good Design Goes Bad Bob Duffy. SQLSaturday #467 Sponsors.
Honest Bob’s Cube Processing Bob Duffy Database Architect.
SQL Server as a Cloud Service April 15th 2016 Warner Chaves Data Platform MVP/SQL Server MCM.
Lecture 17 Raid. Device Protocol Variants Status checks: polling vs. interrupts Data: PIO vs. DMA Control: special instructions vs. memory-mapped I/O.
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.
When Good Design Goes Bad Bob Duffy Database Architect Prodata SQL Centre of Excellence March 2015.
SQL Storage Fundamentals for Azure IaaS
EonStor DS 2000.
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
Section 6: SQL Server on IaaS Best Practices
Matching Storage Spaces Direct Configurations to Your Workload
Everything you need to know!
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.
02 | Design and implement database
SQL Storage Fundamentals for Azure IaaS
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
Running SP 2016 in Azure The Do’s and the Don’ts
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:
Solving ETL Bottlenecks with SSIS Scale Out
Azure and SQL Server: Getting the best out of the cloud
Oracle Storage Performance Studies
SQL On Azure Parikshit Savjani, Sr. Premier Field Engineer.
TechEd /11/2018 6:28 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
What is the Azure SQL Datawarehouse?
What Azure have to offer for your data
Bob Duffy 22 years in database sector, 250+ projects
Proving Hardware Bottlenecks &
A developers guide to Azure SQL Data Warehouse
SQL Server performance tuning on Azure IaaS
SQL Server performance tuning on Azure IaaS
Planning and Deploying PBIRS
Hybrid Power BI With the on Premise Data Gateway
Transaction Log Performance Tuning
Bob Duffy 27 years in database sector, 250+ projects
Dell EMC SQL Server Solutions Doug Bernhardt
Disaster Recovery Done Dirt Cheap Founder Curnutt Data Solutions
ZORAN BARAC DATA ARCHITECT at CIN7
06 | SQL Server and the Cloud
The Database World of Azure
Presentation transcript:

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

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 Overview The Five Steps to Iaas Storage 1. SQL Capacity Planning 2. Selecting your VM 3. Selecting your disks 4. Configure your disks 5. Benchmarking Planning for Elasticity Abusing the rules

Azure Storage Overview 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 (Yet!)

1. Requirements 5. Benchmark 4. Configure Disks 3. Select Disks 2. Select VM 1. Requirements 1. Requirements Aka Capacity Planning Know your IOPS and Throughput Know your RW% Know your components (Data/Log/TempDB) Know your Workload (DWH v OLTP)

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 Derived 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 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 for Perfmon 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/

IOPS * IO Size = Throughput IOPS v Throughout IOPS * IO Size = Throughput 500 iops @8k = 4MB/sec 500 iops @64k = 31MB/sec 500 iops @256= 125 MB/Sec 500 iops @4MB= 2 GB/Sec 80,000 iops @ 64k = 5GB/Sec

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

Analysing IOP Distribution Group IOPS to nearest 50, 100 or 500 step Plot out all data for 15 min to 60 min intervals Count occurrences of each range Don’t forget about SLA hours http://blogs.prodata.ie/post/Using-MAP-Tool-and-Excel-to-Analyse-IO-for-SQL-Consolidation-Part-I-e28093-basic-distribution.aspx

Storage Requirements End Result Workload Size (GB IOPS IO Size Throughput (MB/Sec) Read% Latency Data 2,000 2,400 256k 600 70% 100ms Log 512 2,500 64k 156 4% 3ms TempDB 5,000 312 50% 50ms Notes: - We also need required vCPUs. Lets Assume 4 - May need to store “current” v “planned”

2. Select your VM 5. Benchmark 4. Configure Disks 3. Select Disks 2. Select VM 1. Requirements 2. Select your VM

Cached v Uncached Storage Best Practise https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance https://blogs.technet.microsoft.com/xiangwu/2017/05/14/azure-vm-storage-performance-and-throttling-demystify/

VM IOP Limits

How VM Type and Size affects Storage DS-Series, ACU: 210-250 Cores RAM VM “IOPS” Max MB/sec Effective IOPS@64k VM Cost €/Month 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 (14,493 with EE) €1.23 euro per MB/Sec 62.5 MB/Sec per core https://docs.microsoft.com/en-us/azure/storage/storage-scalability-targets https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general

Introducing SQL Optimised VMs Aka constrained vcpu’s https://docs.microsoft.com/en-us/azure/virtual-machines/windows/constrained-vcpu

Using Storage Limits to place SQL components VM DS14-4 v 2 (16 Core Template Constrained to 4 Cores) Uncached (768 M/Sec) cached (576 M/Sec) Page Blob Disks Page Blob Disks Local SSD SQL Data 600 MB/Sec SQL Log 156 MB/Sec TempDB 312 MB/Sec

3. Select Disks 5. Benchmark 4. Configure Disks 3. Select Disks 2. Select VM 1. Requirements 3. Select Disks

Storage Choices for IaaS ? 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/

SSD Disks P10 P20 P30 P50 (new) Disk Size (GB) 128 512 1TB 4TB IOPS Bottleneck @64k P10 P20 P30 P50 (new) Disk Size (GB) 128 512 1TB 4TB IOPS 500 2,300 5,000 7,500 Throughput 100 150 200 250 Effective Throughput 8 143 Cost €/month 18 68 125 455 Cost € per MB/Sec 2.25 0.46 0.625 1.82 Cost € per TB 144 136 114 P10 is only 8 MB/Sec

Balancing Disk and Managed Storage STORAGE ACCOUNT 20,000 iops or 1,250 MB/Sec VM-SQL1 VM-SQL2 Uncached Storage 768 MB/Sec Cached Storage 564 MB/Sec 1TB SSD 200 MB/Sec 1TB SSD 200 MB/Sec X 4 X 3

4. Configure Disks 5. Benchmark 4. Configure Disks 3. Select Disks 2. Select VM 1. Requirements 4. Configure Disks

Combining Disks with Storage Spaces Storage Pool Just a JBOD Collection of Disks.. Individual disks can be cached or un-cached SqlData Layout: simple (Mirror, Parity) Number of Columns 8= Number of physical disks per write (aka stripe) Interleave 256KB= Size of read/write to a disk (eg I/O Size) SqlLog Layout: Simple Columns=8 Interleave=64k Virtual Disks F:\ (SqlData), or mount point Format: 64k (4k default) L:\ (SqlLog) Format: 64k Volume

Azure Portal Storage Configuration Wizard Advice: configure the disks yourself

Example PowerShell Adding disks to VMs Creating storage spaces $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 Data and Log Debate Same Volume (Same disk and pool) \SqlData \SqlLog Data Log 2 Separate Volumes (Same disk and pool) Data Log 3. Separate Virtual Disks and Volumes (Different Interleave…) Data Log Data Log 4. Separate Pools, Disks and Volumes Data Log

5. Benchmark 5. Benchmark 4. Configure Disks 3. Select Disks 2. Select VM 1. Requirements 5. Benchmark

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 Uncached 2 x P30

8 Core cached 2 x P30

16 Core VM – 4 x 1TB disks

Bonus Content Designing for Elasticity Maxing the Rules

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

Abusing the Rules for max table scan 8 core DS VM 376 MB/Sec max Uncached 288 MB/Sec max cached Place data on BOTH pools

Wish List for SQL IaaS in Azure Provisioning IOPs. Give me 2GB/Sec on my 2TB of data Don’t make me scale ram and everything else Smoother TempDB Configuration Better SQL Storage Configuration Wizard

Just like Jimi Hendrix … We love to get feedback Please complete the session feedback forms

SQLBits - It's all about the community... Please visit Community Corner, we are trying this year to get more people to learn about the SQL Community, equally if you would be happy to visit the community corner we’d really appreciate it.