Dr Greg Low CEO and Principal Mentor SQL Down Under
In Azure or on-premises, app design is critical!
CPU and memory issues are largely unchanged on Azure VMs
Buffer Cache
MetricRequirements Mix of reads vs writesMostly reads Nature of writesMostly asynchronous Average rows per I/OLow I/O size8 to 64 KB common I/O patternMostly random Concurrent usersHigh
MetricRequirements Mix of reads vs writesMostly reads Nature of writesMostly asynchronous Average rows per I/OHigh (often large scans) I/O sizeUp to megabytes I/O patternMostly sequential Concurrent usersLow
Buffer Cache
MetricRequirements Mix of reads vs writesMostly writes Nature of writesMostly synchronous (low latency critical) Average rows per I/OLow I/O size8 to 64 KB common I/O patternMostly sequential
… Datacenter network … Datacenter 1 Datacenter n Region 1 Region 2 …
Virtual Machine Size CPU CoresMemory Allocated Bandwidth (Mbps) Maximum data disks (each up to 1 TB) Maximum IOPS ExtraSmallShared768 MB511 x 500 Small11.75 GB10022 x 500 Medium23.5 GB20044 x 500 Large47 GB40088 x 500 ExtraLarge814 GB x 500 A6428 GB1,00088 x 500 A7856 GB2, x 500
Virtual Machine C:\ OS Disk E:\, F:\, etc. Data Disks D:\ Temp Disk (Dynamic VHD) RAM Cache Local Disk Cache Blobs Blob
Virtual Machine C:\ OS Disk E:\, F:\, etc. Data Disks D:\ Temp Disk (Dynamic VHD) RAM Cache Local Disk Cache Blobs Blob
Virtual Machine C:\ OS Disk E:\, F:\, etc. Data Disks D:\ Temp Disk (Dynamic VHD) RAM Cache Local Disk Cache Blobs Blob
Virtual Machine C:\ OS Disk E:\, F:\, etc. Data Disks D:\ Temp Disk (Dynamic VHD) RAM Cache Local Disk Cache Blobs Blob
Storage Stamp Stream Layer Partition Layer Front-ends LB Intra-stamp replication Stream Layer Partition Layer Front-ends LB Intra-stamp replication Storage Stamp Geo-replication Storage Location Service
Cache size based on VM size
Disk typeRead OnlyRead WriteNone (disabled) OS diskSupportedDefaultNot supported Data disksSupported (up to 4) Default Temporary diskN/A
Random I/O (8KB Pages) Sequential I/O (64KB Extents) Sequential I/O (256KB Blocks) ReadsWritesReadsWritesReadsWrites IOPS Bandwidth4 MB/s 30 MB/s20 MB/s70 MB/s
4 disksRandom I/O (8KB Pages)Sequential I/O (64KB Extents)Sequential I/O (256KB Blocks) ReadsWritesReadsWritesReadsWrites IOPS Bandwidth20 MB/s 120 MB/s80 MB/s170 MB/s270 MB/s 16 disksRandom I/O (8KB Pages)Sequential I/O (64KB Extents)Sequential I/O (256KB Blocks) ReadsWritesReadsWritesReadsWrites IOPS Bandwidth60 MB/s 150 MB/s300 MB/s170 MB/s600 MB/s 8 disksRandom I/O (8KB Pages)Sequential I/O (64KB Extents)Sequential I/O (256KB Blocks) ReadsWritesReadsWritesReadsWrites IOPS Bandwidth30 MB/s 150 MB/s160 MB/s170 MB/s550 MB/s
Test random 8K reads/writes sqlio -kW -s300 -frandom -o32 -b8 -LS -Fparam.txt sqlio -kR -s300 -frandom -o32 -b8 -LS -Fparam.txt
TargetDMV Instance level waitssys.dm_os_wait_stats Expensive queriessys.dm_exec_query_stats I/O consumption and characteristics sys.dm_io_virtual_file_stats Executing requestssys.dm_exec_requests Memory object contentionsys.dm_os_spinlock_stats
Logical Disk Counter Metric Details Disk reads / second Disk writes / second IOPs Number of I/O operations per second Consider adding more data disks in line with your IOPS requirements. Average disk sec / read Average disk sec / write Latency Time taken per I/O operation Variation is common but look at averages over time Average disk bytes / read Average disk bytes / write Block size Average size of I/O operations Larger I/O operations tend to have higher latency (very common in BACKUP/RESTORE) Average / current disk queue length Outstanding IOPS Not very relevant for Azure VM Disk read bytes/sec Disk write bytes/sec Throughput Total volume of data Larger block scans should be able to heavily utilize connection bandwidth
Redeem your benefit today! Develop & Test on cloud VMs at no additional cost! Activate your MSDN Benefit & try it by 9/30 You could win* an Aston Martin V8 Vantage! YOUR OWN QR CODE GOES HERE