The benefits of implementing SQL Server database virtualization are self-evident. For SQLServer2008, Hyper-V is undoubtedly its preferred virtualization platform. However, there is still much work to be done to fully explore the potential of Hyper-V to virtualize SQLServer. This article shares with you some experience in improving the virtualization efficiency of SQL Server databases. 1,
The benefits of implementing SQL Server database virtualization are self-evident. For SQL Server 2008, Hyper-V is undoubtedly its preferred virtualization platform. However, there is still much work to do to fully explore the potential of Hyper-V to virtualize SQL Server. This article will share with you some experience in improving the SQL Server database virtualization efficiency. 1,
The benefits of implementing SQL Server Virtualization are self-evident. For SQL Server 2008, Hyper-V is undoubtedly its preferred virtualization platform. However, there is still much work to do to fully explore the potential of Hyper-V to virtualize SQL Server. This article will share with you some experience in improving SQL Server virtualization efficiency.
1. reasonably allocate virtual processors
Virtual processor is an important factor affecting the performance of virtual machines. for systems with four or fewer CPU cores, allocating virtual processors to SQL Server virtual machines is a relatively simple task. Hyper-V supports up to four virtual CPUs for each virtual machine.
(1) allocate virtual processors
To assign multiple virtual processors to a virtual machine, you can do this: Open Hyper-V Manager, right-click the virtual machine and choose Settinqs, and then click Processor ". In the "Number of logical processors" drop-down list box, select the Number of virtual processors for virtual machines. Of course, we can allocate only the same number of virtual processors as physical cores in the system.
()
(2). quantified CPU allocation
In the SQL Server virtual environment, it is particularly important to ensure that the virtual host has sufficient processing capabilities to provide services for all active virtual machines. To calculate the processing capability required by the Hyper-V host machine, we can use a formula to calculate:
CPU core × CPU speed × CPU utilization = total CPU |
Here, the "CPU core" refers to the number of physical CPUs to be virtualized. "CPU speed" indicates the CPU speed, and "CPU utilization" indicates the average utilization of the CPU.
We need to perform this operation on all servers running on the Hyper-V host machine. Then, use the following formula to add the "total number of CPUs" to obtain the estimated total number of CPUs required by all virtual machines:
Sum of "total CPU" = all CPU |
Although the specific requirements may change, the author's experience is to retain 25% of the host machine processing capability. Therefore, we can use the following formula to determine the virtualization performance of the host machine:
Ideally, we should strive to maintain a one-to-one ing between the virtual CPU and the physical CPU core. Although most server virtual environments have a higher ing ratio. Note that adding a virtual CPU to a virtual machine does not result in linear performance growth. That is to say, adding a second virtual CPU will not double the performance of the virtual machine, which generally increases the performance of the virtual CPU by 10% to 15%.