How to get the biggest bang for your buck with SQL Server on Azure VMs

Published Mar 29 2021 09:00 AM 12.2K Views
Microsoft

Running SQL Server on an Azure virtual machine is one of the quickest and easiest ways to lift-and-shift your SQL workloads into the cloud. The great thing about SQL Server on Azure Virtual Machines is that it’s the same SQL Server database engine you’re used to running on-premises. For the most part, configuration, settings, maintenance, and performance tuning techniques are all going to be the same, but infrastructure configuration such as choosing the right VM size and designing a storage layout are going to be quite different. The choices you make when creating and configuring a SQL Server VM in Azure can have a dramatic impact on performance and cost, potentially improving performance by 35% or more while decreasing the cost. No one knows SQL Server like Microsoft, so it should be no surprise that Azure offers the best overall value for running your SQL Server workloads in the cloud.

 

There are many benefits to running your SQL Server workloads on Azure VMs:

  • SQL IaaS Agent Extension adds an array of manageability features for your SQL Server VMs at no additional cost.
  • Azure Hybrid Benefit allows you leverage your existing on-premises Software Assurance investment in Azure including the value-add of free HA/DR instances for business continuity.
  • Security Center helps keeps your SQL Server secure with Azure Defender for SQL.
  • Competitive price-performance for your modern SQL Server transactional workload, as demonstrated in our recent GigaOm performance benchmark.

So how do you get the best price-performance possible when configuring your SQL Server on Azure VM? In this blog, we’re going to cover three key aspects to right-sizing (and right-configuring) your Azure VM for SQL Server that are based on some common pitfalls customers face when migrating their on-premises workloads to Azure VM:

  • Choosing the best VM series and size for your workload
  • Configuring storage for maximum throughput and lower cost
  • Leveraging unique to Azure features such as host caching to boost performance at no additional cost

To help illustrate how small choices can have a big impact on price-performance, we conducted an internal experiment against two different VMs from our Memory Optimized series that are commonly used to host SQL Server workloads. Here are some specifications for the two VMs:

 

InitialConfigTable.png

* This cost is for compute only with a 3-year reservation, assuming Azure Hybrid Benefit for both Windows OS and SQL Server licensing costs.

 

Note that these two VMs are very similar – they both have the same core count, RAM, and I/O throughput, but the E64-32ds_v4 VM has the addition of a fast local SSD that can be used for both temporary (ephemeral) storage within the VM and for host caching, also known as Azure BlobCache. Host caching is a great way to boost your performance with no additional cost, provided that you choose a VM size that supports it. This is particularly useful for SQL Server workloads which tend to be I/O intensive and read-heavy. In this case, the VM that supports caching is slightly more expensive, but as you’ll see in a moment, a little goes a LONG way when it comes to I/O throughput.

 

Speaking of I/O, how about storage configuration? You have a number of storage choices for Azure VM, but for SQL Server workloads we recommend managed disk, either Premium SSD or Azure ultra disk. Ultra disk provides high throughput at very low latency, but most SQL Server customers find Premium SSD meets their needs if it’s configured correctly. We generally recommend either P30 or P40 drives as these support host caching and provide reservations which can help with overall cost.

 

Coming back to our experiment, let’s assume that we have measured our on-prem workload and we estimate that we’ll need about 3 GBps of I/O throughput. You can’t get this from a single managed disk, so we’ll need to create a storage pool so that we can combine the throughput of multiple Premium SSDs. There are a few different ways we can do this, but generally a large number of small disks gives better price-performance than a small number of large disks. Here’s a comparison, both of these configurations assume 1-year reservation:

 

P60Pool.png

 

P30Pool.png

 

Note that the second configuration has a lot more drives, but the throughput is about the same. The capacity is lower, but we’re sizing for throughput here, not capacity. The price difference is pretty staggering. If you do need more capacity, you can go with larger drives – P40s would give you 32 TiB at $3,937.33/month and still support caching.

For our experiment, 16 TiB was more than enough storage, but we don’t want a single pool because we want to be able to configure the pools separately for data and log files. We created two pools as follows:

 

P30DataPool.png

P30LogPool.png

 

Note the cache settings. Writes in SQL Server are flagged as writethrough which means they always write directly to storage to guarantee durability. This means writes can’t take advantage of host caching. Since the transaction log is mostly writes, there’s no benefit to host caching there, and in fact enabling it for log drives can cause unnecessary overhead.

 

Data files on the other hand are read-heavy, even for most OLTP systems. Reads in SQL Server can take advantage of host caching, and we find that for many customers around 30% of data file reads will get satisfied from the cache, which frees up remote storage bandwidth for writes and other I/O. Remember that turning on host caching is free, so if you’re not configuring your storage and VM to take advantage of it, you’re leaving money (and I/O throughput) on the table!

 

OK, so let’s get to the fun part. We used HammerDB to execute a TPC-C1 style workload against both of our VM configurations. Normally for SQL Server benchmarks we use TPC-E because it’s a more realistic workload, but HammerDB is a common tool used by many database professionals to stress and benchmark systems, so we thought it would be a good choice for this informal experiment in case you want to run something like this yourself. Check out the results. The performance metric used for these tests is New Orders Per Minute (NOPM):

 

PerfResultsTable.png

* This cost is for compute only with a 3-year reservation, assuming Azure Hybrid Benefit for both Windows OS and SQL Server licensing costs.

Just by following the best practices we outlined above, we were able to get 34% MORE performance at 50% of the cost!

 

These are pretty amazing results, but we’re doing a benchmark-style test here, can you really expect these results in your production system with your workload? The answer is yes, and maybe even better than what we see here. The TPC-C workload is designed to stress a system hard, particularly in I/O throughput. Because of this, it’s heavily weighted in favor of writes, about 2 to 1 reads/writes or 67% read / 33% write. Most SQL Server workloads, even busy OLTP workloads, are closer to 80%-90% read / 10%-20% write, so you may see an even bigger benefit from read caching, particularly if you can downsize to a lower-cost VM with a smaller memory footprint.

 

So whether you’re already running SQL Server workloads in Azure VMs, are in the process of migrating your on-prem workloads to Azure, or just considering your options, be sure to check out the following resources to help you get the best performance for your cloud dollar in Azure:

Checklist: Performance best practices & guidelines - SQL Server on Azure VM | Microsoft Docs

Deep Dive: Azure SQL Virtual Machine Sizing | Data Exposed Live - YouTube

Eight ways to optimize costs on Azure SQL | Azure Blog and Updates | Microsoft Azure

 

1The HammerDB TPC-C workload is derived from the TPC-C Benchmark and as such is not comparable to published TPC-C Benchmark results, as the HammerDB TPC-C workload results do not fully comply with the TPC-C Benchmark.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2241698%22%20slang%3D%22en-US%22%3EHow%20to%20get%20the%20biggest%20bang%20for%20your%20buck%20with%20SQL%20Server%20on%20Azure%20VMs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2241698%22%20slang%3D%22en-US%22%3E%3CP%3ERunning%20SQL%20Server%20on%20an%20Azure%20virtual%20machine%20is%20one%20of%20the%20quickest%20and%20easiest%20ways%20to%20lift-and-shift%20your%20SQL%20workloads%20into%20the%20cloud.%20The%20great%20thing%20about%20SQL%20Server%20on%20Azure%20Virtual%20Machines%20is%20that%20it%E2%80%99s%20the%20same%20SQL%20Server%20database%20engine%20you%E2%80%99re%20used%20to%20running%20on-premises.%20For%20the%20most%20part%2C%20configuration%2C%20settings%2C%20maintenance%2C%20and%20performance%20tuning%20techniques%20are%20all%20going%20to%20be%20the%20same%2C%20but%20infrastructure%20configuration%20such%20as%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fperformance-guidelines-best-practices-vm-size%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Echoosing%20the%20right%20VM%20size%3C%2FA%3E%20and%20designing%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fperformance-guidelines-best-practices-storage%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Estorage%20layout%3C%2FA%3E%20are%20going%20to%20be%20quite%20different.%20The%20choices%20you%20make%20when%20creating%20and%20configuring%20a%20SQL%20Server%20VM%20in%20Azure%20can%20have%20a%20dramatic%20impact%20on%20performance%20and%20cost%2C%20potentially%20improving%20performance%20by%2035%25%20or%20more%20while%20decreasing%20the%20cost.%20No%20one%20knows%20SQL%20Server%20like%20Microsoft%2C%20so%20it%20should%20be%20no%20surprise%20that%20Azure%20offers%20the%20best%20overall%20value%20for%20running%20your%20SQL%20Server%20workloads%20in%20the%20cloud.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20many%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsql-server%2Frehost-your-sql-server-to-azure-virtual-machines-for%2Fba-p%2F1698452%22%20target%3D%22_blank%22%3Ebenefits%3C%2FA%3E%20to%20running%20your%20SQL%20Server%20workloads%20on%20Azure%20VMs%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fsql-server-iaas-agent-extension-automate-management%3Ftabs%3Dazure-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESQL%20IaaS%20Agent%20Extension%3C%2FA%3E%20adds%20an%20array%20of%20manageability%20features%20for%20your%20SQL%20Server%20VMs%20at%20no%20additional%20cost.%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fpricing%2Fhybrid-benefit%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Hybrid%20Benefit%3C%2FA%3E%20allows%20you%20leverage%20your%20existing%20on-premises%20Software%20Assurance%20investment%20in%20Azure%20including%20the%20value-add%20of%20free%20HA%2FDR%20instances%20for%20business%20continuity.%3C%2FLI%3E%0A%3CLI%3ESecurity%20Center%20helps%20keeps%20your%20SQL%20Server%20secure%20with%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fsecurity-center%2Fdefender-for-sql-introduction%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Defender%20for%20SQL%3C%2FA%3E.%3C%2FLI%3E%0A%3CLI%3ECompetitive%20price-performance%20for%20your%20modern%20SQL%20Server%20transactional%20workload%2C%20as%20demonstrated%20in%20our%20recent%20%3CA%20href%3D%22https%3A%2F%2Fgigaom.com%2Freport%2Fsql-transaction-processing-price-performance-testing-2%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EGigaOm%20performance%20benchmark%3C%2FA%3E.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESo%20how%20do%20you%20get%20the%20best%20price-performance%20possible%20when%20configuring%20your%20SQL%20Server%20on%20Azure%20VM%3F%20In%20this%20blog%2C%20we%E2%80%99re%20going%20to%20cover%20three%20key%20aspects%20to%20right-sizing%20(and%20right-configuring)%20your%20Azure%20VM%20for%20SQL%20Server%20that%20are%20based%20on%20some%20common%20pitfalls%20customers%20face%20when%20migrating%20their%20on-premises%20workloads%20to%20Azure%20VM%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EChoosing%20the%20best%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fperformance-guidelines-best-practices-vm-size%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EVM%20series%20and%20size%3C%2FA%3E%20for%20your%20workload%3C%2FLI%3E%0A%3CLI%3EConfiguring%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fperformance-guidelines-best-practices-storage%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Estorage%3C%2FA%3E%20for%20maximum%20throughput%20and%20lower%20cost%3C%2FLI%3E%0A%3CLI%3ELeveraging%20unique%20to%20Azure%20features%20such%20as%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fvirtual-machines%2Fpremium-storage-performance%23disk-caching%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehost%20caching%3C%2FA%3E%20to%20boost%20performance%20at%20no%20additional%20cost%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ETo%20help%20illustrate%20how%20small%20choices%20can%20have%20a%20big%20impact%20on%20price-performance%2C%20we%20conducted%20an%20internal%20experiment%20against%20two%20different%20VMs%20from%20our%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fvirtual-machines%2Fsizes-memory%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMemory%20Optimized%3C%2FA%3E%20series%20that%20are%20commonly%20used%20to%20host%20SQL%20Server%20workloads.%20Here%20are%20some%20specifications%20for%20the%20two%20VMs%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22InitialConfigTable.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267817iDB534C16561899F8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22InitialConfigTable.png%22%20alt%3D%22InitialConfigTable.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%222%22%3E*%20This%20cost%20is%20for%20compute%20only%20with%20a%203-year%20reservation%2C%20assuming%20Azure%20Hybrid%20Benefit%20for%20both%20Windows%20OS%20and%20SQL%20Server%20licensing%20costs.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20that%20these%20two%20VMs%20are%20very%20similar%20%E2%80%93%20they%20both%20have%20the%20same%20core%20count%2C%20RAM%2C%20and%20I%2FO%20throughput%2C%20but%20the%20E64-32ds_v4%20VM%20has%20the%20addition%20of%20a%20fast%20local%20SSD%20that%20can%20be%20used%20for%20both%20temporary%20(ephemeral)%20storage%20within%20the%20VM%20and%20for%20host%20caching%2C%20also%20known%20as%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fvirtual-machines%2Fpremium-storage-performance%23disk-caching%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20BlobCache%3C%2FA%3E.%20Host%20caching%20is%20a%20great%20way%20to%20boost%20your%20performance%20with%20no%20additional%20cost%2C%20provided%20that%20you%20choose%20a%20VM%20size%20that%20supports%20it.%20This%20is%20particularly%20useful%20for%20SQL%20Server%20workloads%20which%20tend%20to%20be%20I%2FO%20intensive%20and%20read-heavy.%20In%20this%20case%2C%20the%20VM%20that%20supports%20caching%20is%20slightly%20more%20expensive%2C%20but%20as%20you%E2%80%99ll%20see%20in%20a%20moment%2C%20a%20little%20goes%20a%20LONG%20way%20when%20it%20comes%20to%20I%2FO%20throughput.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESpeaking%20of%20I%2FO%2C%20how%20about%20storage%20configuration%3F%20You%20have%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fvirtual-machines%2Fdisks-types%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ea%20number%20of%20storage%20choices%20for%20Azure%20VM%3C%2FA%3E%2C%20but%20for%20SQL%20Server%20workloads%20we%20recommend%20managed%20disk%2C%20either%20Premium%20SSD%20or%20Azure%20ultra%20disk.%20Ultra%20disk%20provides%20high%20throughput%20at%20very%20low%20latency%2C%20but%20most%20SQL%20Server%20customers%20find%20Premium%20SSD%20meets%20their%20needs%20if%20it%E2%80%99s%20configured%20correctly.%20We%20generally%20recommend%20either%20P30%20or%20P40%20drives%20as%20these%20support%20host%20caching%20and%20provide%20reservations%20which%20can%20help%20with%20overall%20cost.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EComing%20back%20to%20our%20experiment%2C%20let%E2%80%99s%20assume%20that%20we%20have%20measured%20our%20on-prem%20workload%20and%20we%20estimate%20that%20we%E2%80%99ll%20need%20about%203%20GBps%20of%20I%2FO%20throughput.%20You%20can%E2%80%99t%20get%20this%20from%20a%20single%20managed%20disk%2C%20so%20we%E2%80%99ll%20need%20to%20create%20a%20storage%20pool%20so%20that%20we%20can%20combine%20the%20throughput%20of%20multiple%20Premium%20SSDs.%20There%20are%20a%20few%20different%20ways%20we%20can%20do%20this%2C%20but%20generally%20a%20large%20number%20of%20small%20disks%20gives%20better%20price-performance%20than%20a%20small%20number%20of%20large%20disks.%20Here%E2%80%99s%20a%20comparison%2C%20both%20of%20these%20configurations%20assume%201-year%20reservation%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22P60Pool.png%22%20style%3D%22width%3A%20969px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267818iD73AF7EF7715B1DF%2Fimage-dimensions%2F969x431%3Fv%3Dv2%22%20width%3D%22969%22%20height%3D%22431%22%20role%3D%22button%22%20title%3D%22P60Pool.png%22%20alt%3D%22P60Pool.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22P30Pool.png%22%20style%3D%22width%3A%20955px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267819i541C3AD7FA8FC2AA%2Fimage-dimensions%2F955x431%3Fv%3Dv2%22%20width%3D%22955%22%20height%3D%22431%22%20role%3D%22button%22%20title%3D%22P30Pool.png%22%20alt%3D%22P30Pool.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20that%20the%20second%20configuration%20has%20a%20lot%20more%20drives%2C%20but%20the%20throughput%20is%20about%20the%20same.%20The%20capacity%20is%20lower%2C%20but%20we%E2%80%99re%20sizing%20for%20throughput%20here%2C%20not%20capacity.%20The%20price%20difference%20is%20pretty%20staggering.%20If%20you%20do%20need%20more%20capacity%2C%20you%20can%20go%20with%20larger%20drives%20%E2%80%93%20P40s%20would%20give%20you%2032%20TiB%20at%20%243%2C937.33%2Fmonth%20and%20still%20support%20caching.%3C%2FP%3E%0A%3CP%3EFor%20our%20experiment%2C%2016%20TiB%20was%20more%20than%20enough%20storage%2C%20but%20we%20don%E2%80%99t%20want%20a%20single%20pool%20because%20we%20want%20to%20be%20able%20to%20configure%20the%20pools%20separately%20for%20data%20and%20log%20files.%20We%20created%20two%20pools%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22P30DataPool.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267820iA6C366D1ADD193FC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22P30DataPool.png%22%20alt%3D%22P30DataPool.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22P30LogPool.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267822i32CBBAF721C5A8CD%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22P30LogPool.png%22%20alt%3D%22P30LogPool.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20the%20cache%20settings.%20Writes%20in%20SQL%20Server%20are%20flagged%20as%20writethrough%20which%20means%20they%20always%20write%20directly%20to%20storage%20to%20guarantee%20durability.%20This%20means%20writes%20can%E2%80%99t%20take%20advantage%20of%20host%20caching.%20Since%20the%20transaction%20log%20is%20mostly%20writes%2C%20there%E2%80%99s%20no%20benefit%20to%20host%20caching%20there%2C%20and%20in%20fact%20enabling%20it%20for%20log%20drives%20can%20cause%20unnecessary%20overhead.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EData%20files%20on%20the%20other%20hand%20are%20read-heavy%2C%20even%20for%20most%20OLTP%20systems.%20Reads%20in%20SQL%20Server%20can%20take%20advantage%20of%20host%20caching%2C%20and%20we%20find%20that%20for%20many%20customers%20around%2030%25%20of%20data%20file%20reads%20will%20get%20satisfied%20from%20the%20cache%2C%20which%20frees%20up%20remote%20storage%20bandwidth%20for%20writes%20and%20other%20I%2FO.%20Remember%20that%20%3CSTRONG%3Eturning%20on%20host%20caching%20is%20free%3C%2FSTRONG%3E%2C%20so%20if%20you%E2%80%99re%20not%20configuring%20your%20storage%20and%20VM%20to%20take%20advantage%20of%20it%2C%20%3CSTRONG%3Eyou%E2%80%99re%20leaving%20money%20(and%20I%2FO%20throughput)%20on%20the%20table%3C%2FSTRONG%3E!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOK%2C%20so%20let%E2%80%99s%20get%20to%20the%20fun%20part.%20We%20used%20HammerDB%20to%20execute%20a%20TPC-C%3CSUP%3E1%3C%2FSUP%3E%20style%20workload%20against%20both%20of%20our%20VM%20configurations.%20Normally%20for%20SQL%20Server%20benchmarks%20we%20use%20TPC-E%20because%20it%E2%80%99s%20a%20more%20realistic%20workload%2C%20but%20HammerDB%20is%20a%20common%20tool%20used%20by%20many%20database%20professionals%20to%20stress%20and%20benchmark%20systems%2C%20so%20we%20thought%20it%20would%20be%20a%20good%20choice%20for%20this%20informal%20experiment%20in%20case%20you%20want%20to%20run%20something%20like%20this%20yourself.%20Check%20out%20the%20results.%20The%20performance%20metric%20used%20for%20these%20tests%20is%20New%20Orders%20Per%20Minute%20(NOPM)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PerfResultsTable.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F267823i775034B30F0FE12F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PerfResultsTable.png%22%20alt%3D%22PerfResultsTable.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%222%22%3E*%20This%20cost%20is%20for%20compute%20only%20with%20a%203-year%20reservation%2C%20assuming%20Azure%20Hybrid%20Benefit%20for%20both%20Windows%20OS%20and%20SQL%20Server%20licensing%20costs.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3EJust%20by%20following%20the%20best%20practices%20we%20outlined%20above%2C%20we%20were%20able%20to%20get%20%3CSTRONG%3E34%25%20MORE%20performance%20at%2050%25%20of%20the%20cost%3C%2FSTRONG%3E!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThese%20are%20pretty%20amazing%20results%2C%20but%20we%E2%80%99re%20doing%20a%20benchmark-style%20test%20here%2C%20can%20you%20really%20expect%20these%20results%20in%20your%20production%20system%20with%20your%20workload%3F%20The%20answer%20is%20yes%2C%20and%20maybe%20even%20better%20than%20what%20we%20see%20here.%20The%20TPC-C%20workload%20is%20designed%20to%20stress%20a%20system%20hard%2C%20particularly%20in%20I%2FO%20throughput.%20Because%20of%20this%2C%20it%E2%80%99s%20heavily%20weighted%20in%20favor%20of%20writes%2C%20about%202%20to%201%20reads%2Fwrites%20or%2067%25%20read%20%2F%2033%25%20write.%20Most%20SQL%20Server%20workloads%2C%20even%20busy%20OLTP%20workloads%2C%20are%20closer%20to%2080%25-90%25%20read%20%2F%2010%25-20%25%20write%2C%20so%20you%20may%20see%20an%20even%20bigger%20benefit%20from%20read%20caching%2C%20particularly%20if%20you%20can%20downsize%20to%20a%20lower-cost%20VM%20with%20a%20smaller%20memory%20footprint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20whether%20you%E2%80%99re%20already%20running%20SQL%20Server%20workloads%20in%20Azure%20VMs%2C%20are%20in%20the%20process%20of%20migrating%20your%20on-prem%20workloads%20to%20Azure%2C%20or%20just%20considering%20your%20options%2C%20be%20sure%20to%20check%20out%20the%20following%20resources%20to%20help%20you%20get%20the%20best%20performance%20for%20your%20cloud%20dollar%20in%20Azure%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fvirtual-machines%2Fwindows%2Fperformance-guidelines-best-practices-checklist%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EChecklist%3A%20Performance%20best%20practices%20%26amp%3B%20guidelines%20-%20SQL%20Server%20on%20Azure%20VM%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMeuegGS2HEU%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EDeep%20Dive%3A%20Azure%20SQL%20Virtual%20Machine%20Sizing%20%7C%20Data%20Exposed%20Live%20-%20YouTube%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fblog%2Feight-ways-to-optimize-costs-on-azure-sql%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EEight%20ways%20to%20optimize%20costs%20on%20Azure%20SQL%20%7C%20Azure%20Blog%20and%20Updates%20%7C%20Microsoft%20Azure%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%222%22%3E%3CSUP%3E1%3C%2FSUP%3EThe%20HammerDB%20TPC-C%20workload%20is%20derived%20from%20the%20TPC-C%20Benchmark%20and%20as%20such%20is%20not%20comparable%20to%20published%20TPC-C%20Benchmark%20results%2C%20as%20the%20HammerDB%20TPC-C%20workload%20results%20do%20not%20fully%20comply%20with%20the%20TPC-C%20Benchmark.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3E%E2%80%83%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2241698%22%20slang%3D%22en-US%22%3E%3CP%3ERunning%20SQL%20Server%20on%20an%20Azure%20virtual%20machine%20is%20one%20of%20the%20quickest%20and%20easiest%20ways%20to%20lift-and-shift%20your%20SQL%20workloads%20into%20the%20cloud.%26nbsp%3BIn%20this%20blog%2C%20we%E2%80%99re%20going%20to%20cover%20three%20key%20aspects%20to%20right-sizing%20(and%20right-configuring)%20your%20Azure%20VM%20in%20order%20to%20get%20the%20best%20price-performance%20possible%20when%20migrating%20SQL%20Server%20workloads%20to%20Azure%20VM.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2241698%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerAzureVM%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Apr 02 2021 03:13 PM
Updated by: