Benchmarking Physical Machines Vs HyperV VMs
SQL Enterprise licence cost avoidance
Microsoft SQL Server Enterprise edition licensing changed from per-server (and CALs) to per-core. This makes SQL Server Enterprise on our 16 core blade servers very expensive to licence. To workaround this licencing cost we bought 8 core servers with a higher clock speed.
TL;DR - Save money on SQL Enterprise licensing by choosing fewer cores with faster clock speed.
Benchmarked the new 8 cores @3.5GHz SQL server hardware vs our previous SQL server hardware.Also compared running Win2012 on baremetal vs running Win2012 on top of HyperV hypervisor since our DBAs were considering running SQL within a VM.
Microsoft HyperV architecture diagrams talk about “partitions” instead of VMs. When you install the hyperV role, Windows 2012 is effectively physical to virtual (p2v) migrated into a “parent partition” on top of the hypervisor layer. This parent partition runs the host OS (Win2012) and can see all the cores. You then add child partitions (VMs) along side the parent partition.
The benchmark comparison
I like PassMark for comparing hardware configurations and I keep a copy of PassMark benchmark for each new hardware model we deploy.
- HP BL 460c G8, 8 core @ 3.5Ghz
- HP BL 460c G8, 8 core @ 3.5Ghz, HyperVHost (after installing hyperV, Win2012 OS moves to a “parent partition” VM and can see all hardware)
- HP BL 460c G8, 8 core @ 3.5Ghz, HyperVGuest 1vCPU (half a hyper threaded core)
- HP BL 460c G8, 8 core @ 3.5Ghz, HyperVGuest 2vCPU (1 core)
- HP BL 460c G8, 8 core @ 3.5Ghz, HyperVGuest 4vCPU (2 cores)
- HP BL 460c G8, 8 core @ 3.5Ghz, HyperVGuest 8vCPU (4 cores)
- HP BL 460c G8, 8 core @ 3.5Ghz, HyperVGuest 16vCPU (hyperthreading presents 16 logical cores from 8 physical cores)
Reassuring to see no obvious difference running the benchmark tool on physical compared to within a VM when the VM has been allocated all cores. Some tests actually faster in VM compared to physical because the hypervisor is doing some optimisations. The Database Admins then ran HammerDB tests to benchmark SQL performance on this hardware compared to their 16core servers.