• Server Core Installation Option
  • Guest Operating Systems
  • Tuning NUMA Node Preference
  • Performance Tuning Guidelines for Windows Server 2008 May 20, 2009




    Download 399.57 Kb.
    bet14/16
    Sana26.12.2019
    Hajmi399.57 Kb.
    #5294
    1   ...   8   9   10   11   12   13   14   15   16

    Server Configuration


    This section describes best practices for selecting hardware for virtualization servers and installing and setting up Windows Server 2008 for the Hyper‑V server role.

    Hardware Selection


    The hardware considerations for Hyper-V servers generally resemble that of non-virtualized servers, but Hyper-V servers can exhibit increased CPU usage, consume more memory, and need larger I/O bandwidth because of server consolidation. For more information, refer to “Performance Tuning for Server Hardware” earlier in this guide.

    • Processors.

    Hyper-V in Windows Server 2008 supports up to 16 logical processors and can use all logical processors if the number of active virtual processors matches that of logical processors. This can reduce the rate of context switching between virtual processors and can yield better performance overall. To enable support for 24 logical processors, see the Hyper-V update in "Resources."

    • Cache.

    Hyper‑V can benefit from larger processor caches, especially for loads that have a large working set in memory and in VM configurations in which the ratio of virtual processors to logical processors is high.

    • Memory.

    The physical server requires sufficient memory for the root and child partitions. Hyper‑V first allocates the memory for child partitions, which should be sized based on the needs of the expected server load for each VM. The root partition should have sufficient available memory to efficiently perform I/Os on behalf of the VMs and operations such as a VM snapshot.

    • Networking.

    If the expected loads are network intensive, the virtualization server can benefit from having multiple network adapters or multiport network adapters. VMs can be distributed among the adapters for better overall performance. To reduce the CPU usage of network I/Os from VMs, Hyper‑V can use hardware offloads such as Large Send Offload (LSOv1) and TCPv4 checksum offload. For details on network hardware considerations, see “Performance Tuning for the Networking Subsystem” earlier in this guide.

    • Storage.

    The storage hardware should have sufficient I/O bandwidth and capacity to meet current and future needs of the VMs that the physical server hosts. Consider these requirements when you select storage controllers and disks and choose the RAID configuration. Placing VMs with highly disk-intensive workloads on different physical disks will likely improve overall performance. For example, if four VMs share a single disk and actively use it, each VM can yield only 25 percent of the bandwidth of that disk. For details on storage hardware considerations and discussion on sizing and RAID selection, see “Performance Tuning for the Storage Subsystem” earlier in this guide.

    Server Core Installation Option


    Windows Server 2008 features the Server Core installation option. Server Core offers a minimal environment for hosting a select set of server roles including Hyper‑V. It features a smaller disk, memory profile, and attack surface. Therefore, we highly recommend that Hyper‑V virtualization servers use the Server Core installation option. Using Server Core in the root partition leaves additional memory for the VMs to use (approximately 80 MB for commit charge on 64-bit Windows).

    Server Core offers a console window only when the user is logged on, but Hyper‑V exposes management features through WMI so administrators can manage it remotely (for more information, see "Resources").


    Dedicated Server Role


    The root partition should be dedicated to the virtualization server role. Additional server roles can adversely affect the performance of the virtualization server, especially if they consume significant CPU, memory, or I/O bandwidth. Minimizing the server roles in the root partition has additional benefits such as reducing the attack surface and the frequency of updates.

    System administrators should consider carefully what software is installed in the root partition because some software can adversely affect the overall performance of the virtualization server.


    Guest Operating Systems


    Hyper‑V supports and has been tuned for both 32-bit and 64-bit versions of Windows Server 2008 and Windows Server 2003 (SP2 or later versions required) as guest operating systems. The number of virtual processors that are supported per guest depends on the guest operating system. Windows Server 2008 is supported with 1P, 2P, and 4P VMs, and Windows Server 2003 SP2 is supported with 1P and 2P VMs. For the list of other supported guest operating systems, see the documentation that is provided with the Hyper‑V installation.

    The VM integration services, which significantly improve performance, might not work on unsupported guest operating systems.


    CPU Statistics


    Hyper‑V publishes performance counters to help characterize the behavior of the virtualization server and break out the resource usage. The standard set of tools for viewing performance counters in Windows include Performance Monitor (perfmon.exe) and logman.exe, which can display and log the Hyper‑V performance counters. The names of the relevant counter objects are prefixed with “Hyper‑V.”

    You should always measure the CPU usage of the physical system through the Hyper‑V Hypervisor Logical Processor performance counters. The statistics that Task Manager and Performance Monitor report in the root and child partitions do not fully capture the CPU usage.


    Processor Performance


    The hypervisor virtualizes the physical processors by time-slicing between the virtual processors. To perform the required emulation, certain instructions and operations require the hypervisor and virtualization stack to run. Moving a workload into a VM increases the CPU usage, but this guide describes best practices for minimizing that overhead.

    Integration Services


    The VM integration services include enlightened drivers for the synthetic I/O devices, which significantly reduces CPU overhead for I/O compared to emulated devices. You should install the latest version of the VM integration services in every supported guest. The services decrease the CPU usage of the guests, from idle guests to heavily used guests, and improve the I/O throughput. This is the first step in tuning a Hyper‑V server for performance.

    Enlightened Guests


    The operating system kernel in Windows Vista SP1, Windows Server 2008, and later releases features enlightenments that optimize its operation for VMs. For best performance, we recommend that you use Windows Server 2008 as a guest operating system. The enlightenments present in Windows Server 2008 decrease the CPU overhead of Windows that runs in a VM. The integration services provide additional enlightenments for I/O. Depending on the server load, it can be appropriate to host a server application in a Windows Server 2008 guest for better performance.

    Virtual Processors


    Hyper‑V in Windows Server 2008 supports a maximum of four virtual processors per VM. VMs that have loads that are not CPU intensive should be configured to use one virtual processor. This is because of the additional overhead that is associated with multiple virtual processors, such as additional synchronization costs in the guest operating system. More CPU-intensive loads should be placed in 2P or 4P VMs if the VM requires more than one CPU of processing under peak load.

    Hyper‑V supports Windows Server 2008 guests in 1P, 2P, or 4P VMs, and Windows Server 2003 SP2 guests in 1P and 2P VMs. Windows Server 2008 features enlightenments to the core operating system that improves scalability in multiprocessor VMs. Workloads can benefit from the scalability improvements in Windows Server 2008 if they must run 2P and 4P VMs.


    Background Activity


    Minimizing the background activity in idle VMs releases CPU cycles that can be used elsewhere by other VMs or saved to reduce power consumption. Windows guests typically use less than 1 percent of one CPU when they are idle. The following are several best practices for minimizing the background CPU usage of a VM:

    • Install the latest version of VM integration services.

    • Remove the emulated network adapter through the VM settings dialog box (use a synthetic adapter).

    • Disable the screen saver or select a blank screen saver.

    • Remove unused devices such as the CD-ROM and COM port, or disconnect their media.

    • Keep the Windows guest at the logon screen when it is not being used (and disable its screen saver).

    • Use Windows Server 2008 for the guest operating system.

    • Disable, throttle, or stagger periodic activity such as backup and defragmentation if appropriate.

    • Review scheduled tasks and services enabled by default.

    • Improve server applications to reduce periodic activity (such as timers).

    The following are additional best practices for configuring a client version of Windows in a VM to reduce the overall CPU usage:



    • Disable background services such as SuperFetch and Windows Search.

    • Disable scheduled tasks such as Scheduled Defrag.

    • Disable AeroGlass and other user interface effects (through the System application in Control Panel).

    Weights and Reserves


    Hyper‑V supports setting the weight of a virtual processor to grant it a larger or smaller share of CPU cycles than average and specifying the reserve of a virtual processor to make sure that it gets a minimal percentage of CPU cycles. The CPU that a virtual processor consumes can also be limited by specifying usage limits. System administrators can use these features to prioritize specific VMs, but we recommend the default values unless you have a compelling reason to alter them.

    Weights and reserves prioritize or de-prioritize specific VMs if CPU resources are overcommitted. This makes sure that those VMs receive a larger or smaller share of the CPU. Highly intensive loads can benefit from adding more virtual processors instead, especially when they are close to saturating an entire physical CPU.


    Tuning NUMA Node Preference


    On Non-Uniform Memory Access (NUMA) hardware, each VM has a default NUMA node preference. Hyper-V uses this NUMA node preference when assigning physical memory to the VM and when scheduling the VM’s virtual processors. A VM performs optimally when its virtual processors and memory are on the same NUMA node.

    By default, the system assigns the VM to its preferred NUMA node every time the VM is run. An imbalance of NUMA node assignments might occur such that a disproportionate number of VMs are assigned to a single NUMA node.

    Use Perfmon to check the NUMA node preference setting for each running VM by examining the “Hyper-V VM Vid Partition : NumaNodeIndex” counter.

    You can change NUMA node preference assignments by using the Hyper-V WMI API. To set the NUMA node preference for a VM, set the NumaNodeList property of the Msvm_VirtualSystemSettingData class. For information on the WMI calls available for Hyper-V, see "Resources."




    Download 399.57 Kb.
    1   ...   8   9   10   11   12   13   14   15   16




    Download 399.57 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Performance Tuning Guidelines for Windows Server 2008 May 20, 2009

    Download 399.57 Kb.