Executive Summary:
For all its potential benefits, many organizations running Microsoft SQL Server have been slow to adopt virtualization for their SQL Server database servers. However, consolidating SQL Server database servers using today's second generation hypervisor-based virtualization products such as Microsoft's Hyper-V and VMware's ESX Server can offer many benefits. If you want to take advantage of Hyper-V's benefits, you need to know how to best optimize I/O, assign virtual processors, calculate the amount of memory the virtual machines (VMs) will need, make sure you're using Hyper-V's Synthetic Network Devices, and calculate available network adapter capacity.
|
Driven in no small part by a flagging economy, virtualization has taken the IT industry by storm. Virtualization has enabled businesses to sidestep traditional OS and hardware limitations by allowing multiple servers to run together on a single hardware platform. For organizations running Windows Server 2008, Hyper-V is an especially compelling option as Hyper-V is included as an installable role. Let's look at some of the driving forces that are motivating businesses to embrace virtualization—even for holdout installations such as SQL Server—and what you need to know should you decide to run SQL Server on Hyper-V.
Driving Forces Behind Virtualization
One of the most common reasons why organizations have taken advantage of virtualization is to consolidate servers. (Although you can use SQL Server's multiple instances feature to consolidate SQL Server systems, it isn't widely used for that purpose. For more information about this feature, see the "Virtualization vs. Multiple Instances" sidebar.) Organizations can use server consolidation to combine the workloads of multiple physical servers onto a single powerful server, where each workload runs in a separate virtual machine. This increases server utilization and ROI, which is especially important because today's powerful multicore servers are typically underutilized. Server consolidation enables organizations to take advantage of this unused computing potential. It also improves manageability by reducing the number of server systems that need to be managed.
Another driving force behind virtualization is enhancing business continuity. Because virtualization abstracts the server OS from the underlying hardware, it enables more flexibility for backup and disaster recovery. For instance, a server failure in a tradition SQL Server hardware-based installation typically requires a secondary backup system. Some organizations use failover clustering for server-level hardware protection, but failover clustering is typically limited to the most important servers. A hardware failure for most servers means bringing in a replacement server, reimaging the system, and restoring the latest backup—a process that can take several hours at the very minimum. Virtualization technology can speed up the recovery process by allowing an organization to bring a copy of the SQL Server virtual machine (VM) online on another virtual server—a process that takes seconds instead of hours. In addition, features such as Quick Migration and Live Migration (which will be available in Windows Server 2008 R2) enable businesses to address planned downtime scenarios with little or no interruption of services to the end user.
Another popular use for virtualization is using it for development servers. You can also use virtualization for staging servers used to test system updates and application changes before deploying them into production.
For all its potential benefits, many organizations running SQL Server have been slow to adopt virtualization for their database servers. The trade-off for the benefits of virtualization is performance. Many businesses are concerned that running SQL Server on a VM won't provide the performance that their users require. But this was more the case in the early days of virtualization. Today's second generation hypervisor-based virtualization products like Microsoft's Hyper-V and VMware's ESX Server have been successfully used in many production virtualization implementations.
In addition, many people are under the mistaken impression that Microsoft doesn't support running SQL Server in a virtual environment. This used to be true for SQL Server 2005 and the older Virtual Server 2005 product. However, that all changed with the release of the Hyper-V virtualization platform and SQL Server 2008. Microsoft supports SQL Server running under Hyper-V, ESX Server, and other virtualization platforms that are certified through Microsoft's Server Virtualization Validation Program (SVVP). To learn more about Microsoft's support policy for running SQL Server in a virtualized environment, see the Microsoft article "Support policy for Microsoft SQL Server products that are running in a hardware virtualization environment".
Finally, the licensing for running SQL Server on a VM can be confusing. However, when using the right Windows Server and SQL Server editions, there can be significant licensing advantages when using virtualization. For more information about licensing, see the "Virtualization Licensing for Windows Server and SQL Server" sidebar.
Optimizing VM I/O
Performance is the number one concern for running SQL Server on a VM. The bottleneck of most database servers is I/O and not processing power. This is especially true for SQL Server running on a VM. Taking steps to improve the I/O throughput is one of the most important factors when setting up SQL Server VMs. The first issue is choosing the right type of Virtual Hard Disk (VHD) for your SQL Server installation. Hyper-V supports the following types of VHDs:
- Dynamic VHDs. A dynamic VHD uses only the space required and automatically expands when more space is needed.
- Fixed VHDs. A fixed VHD is sized to its full capacity upon creation.
- Pass-through VHDs. A pass-through VHD is configured to use storage on the virtualization host.