Virtualizing SQL Server is not a new conversation for anybody who’s been around the technology over the last few years. But recently there’s been a new twist to the conversation regarding licensing.
Microsoft has changed the licensing model for SQL Server Enterprise Edition 2012 (SQLEE). It’s important to remind people here that Enterprise Edition is the only way to get high availability with SQL Server. With SQL 2008, you could license Enterprise Edition under the “Server+CAL” model. This meant that customers could buy virtually unlimited SQL processing with Enterprise features and, by limiting the number of clients directly accessing SQL, they could limit the cost of the SQL licensing.
The Lemons (SQL Licensing Changes)
“Per core” licensing is the only option available to SQL 2012 EE customers. In a virtual environment, it’s “per vCPU”. What’s more is that any server licensed for SQLEE needs a minimum of 4 licenses, regardless of the number of cores or vCPUs in use. This is no surprise, and I don’t think any of us should hold this against Microsoft. SQL Server is a very robust database platform, and its primary competitor has used this licensing model for many years now – Microsoft has been undervaluing their technology for the better part of a decade.
But let’s take a look at the kind of effect this can have on licensing costs. Most of the time I see physical SQL Servers with 16 cores. This makes sense – a decent server with 4 quad core processors is of pretty good value from almost any server vendor. Through savvy application layer design, customers can limit the number of clients and devices directly querying the database; normally I see between 4 and 10 clients per server. The list price for SQL 2008 EE was $8,500 per server, plus $150 per CAL. So you could walk out the door with a highly available SQL Server for $10,000. With SQL 2012 EE at $6,874 per core, this same server would cost $109,984 – nearly an 11x increase in price.
Even if you don’t have a processor intensive workload, this can still be costly. Let’s say you can rip out 3 of those 4 processors and still run efficiently. After all, not all business critical workloads are processor intensive, right? But even the smallest possible server is going to cost nearly 3x the licensing of a 2008 Server+CAL model
The Sugar (All-you-can-eat SQL Server Enterprise)
Microsoft has embraced virtualization with its new SQL licensing model. I might need HA for a workload, but it might not be processor intensive. The graph below shows a prime example, where the CPU at peak is 31% busy.
This particular server has 16 cores, and as we’ve seen, cores = money in the SQL 2012 world. If this customer could find a way to use those idle cycles for other SQL workloads, then they can save some significant money ($63,000 to be exact). There are a few different ways to do this:
- Putting multiple databases in a single instance
- Putting multiple instances on a single physical machine
- Putting multiple virtual machines on a single physical host
Microsoft has embraced virtualization here, because if you license the processors on a given physical machine SQL Server Enterprise, you can put all the SQL Server Enterprise VMs you want on that physical machine. It doesn’t matter which hypervisor you’re using – VMware, Hyper-V, Xen, or Joe’s Hyperific Emporium and Bait Shack’s HyperVisor. As long as it’s on the SVVP list, you can do it. The two big caveats are:
- If a VM is running SQL Server, either all the cores on the physical box hosting it must be licensed, or the VM must be licensed in a per vCPU manner
- If you have gone with the core model in a virtualized environment, you need Software Assurance, or you are limited to one physical server move per 90 days.
The Water (Sub-Cluster licensing)
One of the biggest mistakes people make is licensing all the cores in a hypervisor cluster, or going to the trouble of building a dedicated cluster for SQL Server. The first is far more expensive than it needs to be, and the second eats into the flexibility and value proposition of virtualization. Let’s say I have an 8 node cluster, with 16 cores each. This would cost about $900,000 to license. I might be tempted to create a smaller cluster just dedicated to SQL Server. But then I would be creating a processing silo, which wouldn’t be able to be shared amongst my other workloads.
The best option by far is sub-cluster licensing. I could license just one of my servers, run as many VMs that can fit on that server. I can still have HA, because passive nodes in a failover cluster do not need to be licensed. If I move all my SQL VMs en masse to another host, I still have to license only one host. Density is the key here. Most people will do 4:1 vCPU:Core ratio and still get by just fine. Some of Microsoft’s models do up to 12:1 vCPU:Core ratio, and if you can get assure performance with that model, you can get absolutely fantastic savings. This graph compares 4 Physical Servers with the minimum of 4 cores each compared to a virtualized infrastructure with the 4 vCPUS and a conservative 4:1 vCPU:core ratio. Most shops I see will consolidate more aggressively for more savings.
The Lemonade (Enterprise Edition for All)
Being able to choose SQL features like failover clustering and availability groups based on the workload rather than the licensing cost is by far the best aspect of this approach. Imagine you have 8 SQL Standard Edition servers and you can consolidate those on a virtual platform with a 2 vCPUs:VM and a 4:1 vCPU:Core ratio. You can get Enterprise features for those instances, and STILL save money on licensing.
The Blender (Performance Metrics)
For most folks, it’s not a matter of whether you can benefit from the approach, it’s how much you can benefit from it. Everybody has some spare CPU on their physical servers, and a renewed server infrastructure would only create more spare CPU cycles. So do some simple data gathering. Look at how much CPU you have left over today. Do some math to figure out how much spare CPU you’d have on a new compute infrastructure. I’ve stepped through this exercise with numerous customers, and they’ve all been surprised at the extent to which this can not just save money, but add features and functionality to their environment.