Hyper-V Server NUMA

Source: Internet
Author: User

Hyper-V Server NUMA

In the new Windows R2 Hyper-V 4.0, Hyper-V provides support for NUMA architectures at the virtual machine level, and the NUMA architecture has been a very popular and high-performance solution for medium-to large-scale systems, with excellent performance in terms of system latency. A NUMA system is typically a multiprocessor system in which the memory latency differs depending on the processor that accesses it. Memory is divided into multiple nodes, and the latency between the CPU and the node may vary, and each CPU is considered part of the node that it can access the most quickly. If you are not familiar with NUMA, you can first understand the NUMA structure.

By using NUMA, a processor can access local memory (directly attached to that processor's memory) faster than accessing remote memory (memory belonging to other processors in the system). High-performance applications such as the modern operating system and SQL Server are optimized for the NUMA topology of the system during development, improving performance by taking into account the presence of NUMA during thread scheduling or memory allocation.

By projecting a virtual NUMA topology inside a Hyper-V virtual machine, you can achieve more optimized performance and load scalability in a large-scale virtual machine environment. Doing so allows the guest operating system and applications such as SQL Server, or IIS to take full advantage of NUMA to optimize performance. The default virtual NUMA topology that is projected to a Hyper-V virtual machine is optimized to be consistent with the NUMA topology of the host, as shown in the client Numa topology, which matches the host's NUMA topology by default.

650) this.width=650; "height=" 484 "title=" clip_image002 "style=" Border-top:0px;border-right:0px;background-image: none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" clip_image002 " Src= "http://s3.51cto.com/wyfs02/M00/77/C3/wKiom1ZuG_mSnh0EAADGeMtmP4o947.jpg" border= "0"/>

Guest NUMA ensures optimal performance for critical NUMA-aware workloads and maximizes the benefits of investment in hardware, software, and applications by leveraging the performance of the underlying hardware and the capabilities of the hardware itself. Customers running SQL and IIS will get a lot of benefit from guest NUMA

High-performance applications such as Microsoft SQL Server 2012 and Internet Information Services (IIS) 8 in Windows Server 2012 are aware of NUMA, compared to NUMA-enabled Platforms and virtualized instances running in virtual machines can greatly improve performance. Support for guest NUMA is also available for highly available solutions that are built using Windows Server 2012 failover Clustering. The failover cluster evaluates the node NUMA configuration before moving the virtual machine to ensure that the target node is well-supported for the load running in the virtual machine.

If you configure a virtual machine to use dynamic memory, only one virtual NUMA node (that is, a flat NUMA topology) is projected into the guest system, and virtual NUMA support is virtually disabled.

Use the following command to see if the host system is NUMA-based:

Get-vmhostnumanode:

650) this.width=650; "height=" 219 "title=" clip_image004 "style=" Border-top:0px;border-right:0px;background-image: none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" clip_image004 " Src= "http://s3.51cto.com/wyfs02/M01/77/C3/wKiom1ZuG_qCo7OsAAB0jjli8kU351.jpg" border= "0"/>

Open Hyper-V Manager and click on the right "hyper-V Settings":

650) this.width=650; "height=" 272 "title=" clip_image006 "style=" Border-top:0px;border-right:0px;background-image: none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" clip_image006 " Src= "http://s3.51cto.com/wyfs02/M02/77/C3/wKiom1ZuG_zB45ZuAACQ8VjechQ395.jpg" border= "0"/>

Hyper-V Settings page Select Numa spanning, tick "Allow Virtual machine node":

650) this.width=650; "height=" title= "clip_image008" style= "Border-top:0px;border-right:0px;background-image: none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" clip_image008 " Src= "http://s3.51cto.com/wyfs02/M00/77/C3/wKiom1ZuG_7zVyIpAADEOdNesIg399.jpg" border= "0"/>

Use PowerShell settings to allow the physical machine to cross NUMA nodes command as follows:

Set-vmhost-numaspanningenabled $true

650) this.width=650; "height=" "title=" clip_image010 "style=" Border-top:0px;border-right:0px;background-image: none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" clip_image010 " Src= "http://s3.51cto.com/wyfs02/M01/77/C3/wKiom1ZuG_-zTua0AAAxVMLr1Pk073.jpg" border= "0"/>

When you set the Enable NUMA on a Hyper-V host, all virtual machines running on the Hyper-V host are affected. The NUMA spanning setting determines the behavior of the virtual machine when the memory on the host is insufficient to perform the best mapping between the virtual NUMA node and the host's physical NUMA node. This setting affects the following virtual machine actions: Startup, restore, and migration.

When NUMA spanning is enabled and because the memory limit must split one or more virtual NUMA nodes between two or more physical NUMA nodes, you can still start the virtual machine or restore or migrate the VM to another host. However, this split will result in a non-optimal mapping between the virtual NUMA and the physical NUMA nodes. NUMA-aware workloads may even be performed in a non-optimal manner, for example, memory accesses that are displayed locally in a virtual machine can actually become remote on the host's physical NUMA topology. In addition, because mapping a virtual NUMA node to a physical NUMA node may vary depending on the memory availability when the virtual machine is started, performance may be inconsistent after each restart of the virtual machines.

Virtual NUMA to physical NUMA splitting may be performed in the following cases:

1. The virtual NUMA node used when configuring the virtual machine is larger than the host's physical NUMA node. This may be caused by the NUMA settings for manually configuring the virtual machine, or because the virtual machine was originally created on a server running Hyper-V and then moved to a server with a different physical NUMA topology.

2. Currently allocating available memory on a physical NUMA node requires at least one virtual NUMA node to be supported by memory on multiple physical NUMA nodes. The available memory allocations may be caused by the memory usage of other virtual machines or the host computer system.

When NUMA spanning is disabled, if you force a virtual machine to split a virtual NUMA node between two or more physical NUMA nodes, Hyper-V will not start, restore, or accept live migration of the virtual machine. This ensures that the virtual machine is always running at peak performance. Each virtual NUMA node is supported by a physical NUMA node, and the virtual NUMA topology is fully consistent with the NUMA topology of the physical server. This setting is recommended for NUMA-aware workloads that always require optimal performance, but it may cause virtual machines to fail to start, restore, or migrate.

Advantages and disadvantages of enabling or disabling NUMA spanning

1. Enable:

Advantage: Virtual machines can take advantage of any memory available on the host, regardless of the allocation across physical NUMA nodes. The virtual machine is started, regardless of its virtual NUMA topology, even if it is inconsistent with the host's physical NUMA topology.

Disadvantage: Virtual machine performance may vary after each virtual machine restart. Virtual NUMA consistency may vary after each boot. NUMA-aware workloads may not perform optimally because virtual NUMA topologies may not be consistent with physical NUMA topologies.

2. Disable:

Pros: NUMA-aware workloads can perform optimally because the virtual NUMA topology is consistent with the physical NUMA topology. The virtual machine performance remains consistent after each reboot.

Disadvantage: If virtual NUMA topologies for virtual machines are not configured to match the physical NUMA topology of the target host, you may not be able to migrate the virtual machines to a given host. Virtual machines with dynamic memory enabled cannot use more processors or memory than are available in a single physical NUMA node.

Virtual NUMA

If you need to support virtualized, large scale workloads, hyper-V in Windows Server R2 provides extensible virtual machine extension limits. You can allocate up to 64 virtual CPUs and 1 terabytes of RAM to a single virtual machine. When you create a larger virtual machine, you may use RAM from multiple NUMA nodes on the host system. In such a virtual machine configuration, if the virtual processor and memory continue to be allocated from a single NUMA node, the workload will not take advantage of the NUMA optimization feature and performance will be degraded.

In Windows Server R2, Hyper-V provides virtual NUMA topologies to virtual machines. By default, this virtual NUMA topology is optimized to match the NUMA topology of the underlying host computer. Exposing a virtual NUMA topology in a virtual machine allows the guest operating system and any NUMA-aware applications running in it to take advantage of NUMA performance optimizations, just as it does when running on a physical computer.

From a workload point of view, there is no difference between virtual and physical NUMA. In a virtual machine, local memory results are quickly accessed on the underlying physical system when the workload allocates local memory for the data and accesses the data in the same NUMA node. Can successfully avoid performance loss due to remote memory access.

The way to configure NUMA in a virtual machine is as follows:

Right-click the virtual machine, select settings, expand Processors, and tap NUMA:

650) this.width=650; "height=" title= "clip_image012" style= "Border-top:0px;border-right:0px;background-image: none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "alt=" clip_image012 " Src= "http://s3.51cto.com/wyfs02/M01/77/C2/wKioL1ZuHAfSPTNQAAEz8EB9d5A505.jpg" border= "0"/>

Here we can use the NUMA topology of the hardware, or you can customize the NUMA topology (not described here).

Knowledge about Hyper-V Server NUMA topologies Let's introduce you so much today! Interested friends can go to Microsoft's TechNet to view the relevant information!

This article is from the "Wu Yuzhang Microsoft blog" blog, make sure to keep this source http://wuyvzhang.blog.51cto.com/9992636/1722668

Hyper-V Server NUMA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.