Gain enhanced security and performance with Windows Server 2025—now in preview
We are excited to announce that Windows Server 2025 is available in public preview and ready for you to download in the Evaluation Center.
This post was authored by Liang Yang, Principal Performance Engineer on the Hyper-V team and Jos de Bruijn, Senior Program Manager on the SQL Server team.
With Windows Server 2016, Microsoft has significantly bumped up the Hyper-V Virtual Machine (VM) scale limit to embrace new scenarios such as running e-commerce large in-memory databases for Online Transaction Processing (OLTP) and Data Warehousing (DW) purposes. In this post, we highlight the performance of in-memory transaction processing at scale using SQL Server 2016 running in a Windows Server 2016 Hyper-V VM.
The result: 343,000 transactions per second using an order processing workload with a 4 terabyte in-memory database, running in a VM with 5.5 terabytes of memory and 128 virtual processors. The performance in the VM was >95% of the performance on a physical server.
Below, we first present our findings, comparing the performance of a physical host versus a Hyper-V large-scale VM. We then recap the increased scalability for VMs with Hyper-V in Windows Server 2016, in-memory transaction processing support in SQL Server 2016, and the benchmark workload we used to obtain these performance numbers. Finally, we detail the hardware and software setup used in the experiment.
We used BenchCraft, an internal Microsoft tool, to run an OLTP (Online Transaction Processing) workload against the in-memory database. The in-memory database size is approximately 4TB with durable, fully logged tables – some of those tables have over 5 billion rows. We achieved over 340K OLTP Transactions per Second (TPS) when running the OLTP workload in a single large-scale Hyper-V VM. Compared with 358K TPS performance with the physical host, Hyper-V VM delivers ~95% of what a physical host can do.
Physical Host | Hyper-V Large-Scale VM | |
TPS (Transactions per Second) | 358K TPS | 343K TPS |
RT (Average Response Time) | 0.01 seconds | 0.02 seconds |
CPU utilization% | 80% over 144 LPs | 95% over 128 VPs |
Table 1. In-Memory Processing Performance Numbers Comparison
Windows Server 2016 increases the scalability for Hyper-V virtual machines (VMs), with support for up to 240 virtual processors and 12 terabytes of memory. Below is the comparison between Windows Server 2012/2012 R2 and Windows Server 2016 for Hyper-V scalability on a per VM basis:
Windows Server 2012/2012 R2 Standard & Datacenter |
Windows Server 2016 Standard & Datacenter | |
Physical (Host) Memory Support | Up to 4 TB per physical server | Up to 24 TB per physical server (6x) |
Physical (Host) Logical Processor Support | Up to 320 LPs | Up to 512 LPs (1.6x) |
Virtual Machine Memory Support | Up to 1 TB per VM | Up to 12 TB per VM (12x) |
Virtual Machine Virtual Processor Support | Up to 64 VPs per VM | Up to 240 VPs per VM (3.75x) |
Table 2. Hyper-V Scalability Limit Comparison
Note: to use the new Hyper-V large scale VMs, the follow conditions must be met:
In-Memory OLTP is the premier performance technology of SQL Server which significantly increases performance of transactional workloads, compared with traditional (disk-based) database technology. It was first released as part of SQL Server 2014, with further usability and performance improvements in SQL Server 2016 and in Azure SQL Database.
With the memory-optimized tables and natively compiled stored procedures introduced by In-Memory OLTP, customers achieve up to 30x (30-fold) performance improvement compared with traditional tables and stored procedures. Data storage and data access in memory-optimized tables is optimized around the data being memory-resident, and the Transact-SQL logic in natively compiled stored procedures is compiled to machine code. These efficiencies result in very low latency of user transactions, which results in short response times and allows a single CPU core to execute that many more transactions per second. In addition, transaction processing for memory-optimized tables is completely latch- and lock-free – even spinlocks are avoided completely. This allows all concurrent transactions in the system to execute without interference, resulting in linear scaling of transaction throughput with the number of CPU cores in the server.
For more details about In-Memory OLTP see In-Memory OLTP (In-Memory Optimization).
The benchmark for the performance experiments represents an example order processing and fulfillment workload. It is described on the SQL Server Samples GitHub repository: Order Processing Benchmark using In-Memory OLTP. Both experiments use a 4 terabyte version of the database as a starting point of the run. Below is the transaction breakdown in details for the workload being used.
Transaction | Type | Description | Distribution |
GetOrdersByCustomerID | Read-only | Select customer info, orders, and order lines for a given customer. | 25.8% |
GetProductsByType | Read-only | Select top 10 products of a given type, ordered by price. | 19.4% |
GetProductsPriceByPK | Read-only | Select all products in a given ID range, ordered by price. | 12.9% |
ProductSelectionCriteria | Read-only | Select top 20 products in a given ID range with the highest computed “closeness” factor against the PurchaseCriteria. | 6.5% |
InsertOrder | Read-write | Insert a new order for a given customer with up to five order lines. | 32.3% |
FulfillOrders | Read-write | Fulfill 10 oldest outstanding orders. | 3.2% |
Table 3. OLTP In-Memory Workload Characteristics
We used the same client setup for both experiments. We used 26 workload drivers, with 800 threads per driver, for a total of 20,800 client connections. SQL server and clients are running on separate but two identical machines using dedicated network (100GbE x 4) to connect them together.
To compare the performance of the benchmark between physical and virtual machines, we used the same physical hardware. For the first experiment, we ran the workload with SQL Server 2016 running on the physical machine. For the second experiment we created a Hyper-V VM on the same physical machine, and ran the workload with SQL Server running in the VM.
Find below the configuration for the physical machines used in the experiments, as well as the Hyper-V virtual machine (VM). One physical machine was used for all the workload drivers, while the other machine was used to run SQL Server in the first experiment, and was used as Hyper-V host in the second experiment. Four dedicated 100GbE network links are used to connect the two physical machines, for both experiments.
The new scale limits for Windows Server 2016 Hyper-V allow large scale VMs to host all sizes of in-memory database management systems on the Cloud and provide great performance for in-memory transaction processing using SQL Server 2016.
To get more information on the benefits of running SQL Server 2016 on Windows Server 2016: