We used eight VMs in the tests and assigned 12 vCPUs and a 224 GB memory reservation to each VM. Each of the four servers hosted two VMs, using a total of 24 vCPUs and 448 GB of memory per server. The general recommendation for virtualizing production systems is not to exceed the ratio of 1 to 1 for vCPU to pCPU. Using a ratio of 1 to 1 or less for production systems minimizes the possibility of resource contention affecting the system. Additionally, using a ratio of 1 to 1 or less follows the recommendation of starting with fewer vCPUs to avoid CPU scheduling constraints.
Using 24 vCPUs across the two VMs means we assigned 50 percent of the physical 48 CPU cores to our SQL workload tests. The remaining CPU resources were for use by the Hyper-V and S2D processes.
We were slightly more aggressive with memory reservations by reserving a total of 448 GB (58 percent of the total 768 GB) for the two VMs on each server. For many of our database customers, adding memory to VMs and using fewer vCPUs has improved performance.
The following figure illustrates the test configuration for SQL Server 2017 on S2D.
Figure 9. SQL Server 2017 on S2D test configuration