Optimizing Performance on Hyper-V
The following considerations apply when running BizTalk Server and/or the SQL Server instance(s) that have the BizTalk Server databases on Hyper-V virtual machines.
Plan to allocate 110% to 125% of the hardware resources required by a physical hardware solution to the Hyper-V virtual machines used for the solution. By configuring the Hyper-V virtual machine with additional resources, you will ensure that it can provide performance on par with physical hardware while accommodating any overhead required by Hyper-V virtualization technology. Follow the guidance in the “Planning the Environment for BizTalk Server” section of the BizTalk Server Operations Guide at http://go.microsoft.com/fwlink/?LinkId=122399 to scope the hardware requirements for the solution including:
- The edition and number of BizTalk Servers that will be required by the solution. Review other BizTalk Server planning considerations documented in “Planning the BizTalk Server Tier” at http://go.microsoft.com/fwlink/?LinkId=122401.
- The version and number of SQL Server computers that will be required by the solution. Review other database planning considerations documented in “Planning the Database Tier” at http://go.microsoft.com/fwlink/?LinkId=122402.
- Complete planning for development, testing, staging, and production environments documented at “Planning the Development, Testing, Staging, and Production Environments” at http://go.microsoft.com/fwlink/?LinkId=122403.
After scoping the hardware requirements of your BizTalk Server solution, plan to configure the Hyper-V machines with 110% – 125% of the CPU, memory, and disk resources required by the physical hardware, if possible. For example, the hardware requirements of a physical BizTalk Server used by the solution is determined to be 2GB RAM, a dual core CPU running at 2GHZ, and 2x 500 GB physical disks, then ideally, the Hyper-V virtual machine used by the solution would be configured with 2.5 GB RAM, 2 or more virtual processors running >= 2.2 GHZ, and faster physical disks (typically by adding spindles or using faster disks).
Use the following general guidelines to configure Hyper-V for optimal performance.
- Follow recommendations in the “Performance Tuning for Virtualization Servers” section of the “Performance Tuning Guidelines for Windows Server 2008” document available at http://go.microsoft.com/fwlink/?LinkId=121171. For the test scenarios described in Testing BizTalk Server Performance on Hyper-V, the configuration options that were applied are described in the “Physical Infrastructure Specifics” and the “Virtualization Specifics” sections of the Overview of Test Scenarios topic.
- Complete the recommendations in the topics Best Practices for Using BizTalk Server on Hyper-V and Installing and Configuring BizTalk Server and Hyper-V.
- Ensure that Hyper-V Integration Services are installed on both the host and the guest operating systems. Hyper-V integration services provide virtual server client (VSC) code for Hyper-V enlightened I/O, which significantly increases the performance of certain operating system functions (such as memory management and network performance).
- Avoid running any Roles, Features, or custom services on the host operating system for the Hyper-V virtual machines used by the solution. If your solution requires any Roles, Features, or custom services, they should be run on a Hyper-V virtual machine rather than on the host operating system.
Use the following guidelines to optimize performance of disk, memory, network, and processor in a Hyper-V virtual environment.
Optimize Disk Performance
- Use the pass-through disk feature in Hyper-V when running SQL Server in a Hyper-V virtual machine – BizTalk Server persists its transaction state to SQL Server. While disk I/O on a BizTalk Server computer is typically very low, disk I/O on the SQL Server computer hosting the BizTalk Server databases is typically very high. To ensure optimal performance of the disk subsystem used by SQL Server running in a Hyper-V virtual machine, configure the disks used by SQL Server as “pass-through” disks in the Hyper-V Manager. Pass-through disk support provides improved performance, on par with physical disk performance, which is critical for disk I/O intensive applications such as the SQL Server instance that hosts the BizTalk Server databases. Note that “pass-through” disk support provides improved performance at a small cost to convenience. “Pass-through” disks are essentially physical disks/LUNs that are attached to a virtual machine and do not support some of the functionality of virtual disks, such as Virtual Machine Snapshots.
- Consider configuring pass-through disks for data volumes using only the SCSI controller – This is recommended because the SCSI controller can only be installed if Hyper-V integration services are installed whereas the IDE controller is available without installing Hyper-V integration services. If the IDE controller is installed without installing Hyper-V integration services, then disk I/O will be performed without the benefit of the IDE filter driver and will be sub-optimal. Therefore, to ensure optimal disk I/O performance for the data files in a Hyper-V virtualized environment, install integration services on both the host and guest operating system and configure pass-through disks for data volumes with the SCSI controller.
Important Do not attach a system disk to a SCSI controller. A virtual hard disk that contains an operating system must be attached to an IDE controller.
Optimize Memory Performance
- Ensure there is sufficient memory installed on the physical computer that hosts the Hyper-V virtual machines – Available physical memory is often the most significant performance factor for BizTalk Server running on a Hyper-V virtual machine. This is because each virtual machine must reside in non-paged-pool memory, or memory that cannot be paged to the disk. Because non-paged-pool memory cannot be paged to disk, the physical computer that hosts the virtual machines should have available physical memory equal to the sum of the memory allocated for each virtual machine plus the following:
300 MB for the Hypervisor plus 32 MB for the first GB of RAM allocated to each virtual machine plus another 8 MB for every additional GB of RAM allocated to each virtual machine plus 512 MB for the host operating system running on the root partition
Note As a general rule of thumb, plan to allocate at least 512 MB memory for the root partition to provide services such as I/O virtualization, snapshot files support, and child partition management.
- Use a 64-bit guest operating system when possible – Consider using a 64-bit operating system for each guest operating system. This should be done because by default, 32-bit Windows operating systems can only address up to 2GB of virtual address space per process. Installation of a 64-bit operating system allows applications to take full advantage of the memory installed on the physical computer that hosts the Hyper-V virtual machines.
Optimize Network Performance
Ensure guest operating systems are configured to use a “Network Adapter” as opposed to a “Legacy Network Adapter.” Emulation associated with running the “Legacy Network Adapter” consumes significant CPU overhead.
Optimize Processor Performance
- Configure a 1-to-1 ratio of virtual processor to logical processors for best performance – When running a CPU intensive application, the best configuration is a 1-to-1 ratio of virtual processors in the guest operating system(s) to the logical processors available to the host operating system. Any other configuration such as 2:1 or 1:2 is less efficient. The following graphic illustrates a 1-to-1 ratio of virtual processor cores in the guest operating system(s) to logical processors available to the host operating system:
- Be aware of the virtual processor limit for different guest operating systems and plan accordingly – The number of processor cores that are available to the guest operating system running in a Hyper-V virtual machine can impact the overall performance of the hosted application. Therefore, consideration should be made as to which guest operating system will be installed in the Hyper-V virtual machine to host the BizTalk Server and/or SQL Server instance(s) that host the BizTalk Server databases. Hyper-V accommodates the following number of virtual processors for the specified guest operating system:
Operating system Virtual processor limit
Windows Server 2008 64-bit
Windows Server 2003 32-bit
Windows Server 2008 32-bit
Windows Server 2003 64-bit
Windows Vista SP1 32-bit
Windows XP SP3 32-bit
Note For more information about the guest operating systems that are supported on Hyper-V see http://go.microsoft.com/fwlink/?LinkID=118347.
The BizTalk Server Performance Optimizations Guide, available at http://go.microsoft.com/fwlink/?LinkId=122477, offers general guidance for configuring, testing, and optimizing performance of a BizTalk Server solution. While the guide does not offer specific recommendations for optimizing performance of BizTalk Server in a Hyper-V virtualized environment, the techniques are applicable to any BizTalk Server solution, whether running on physical hardware or on a Hyper-V virtualized environment.