Virtual Machine CPU competition mechanism in Hyper-V 3

Source: Internet
Author: User


In Hyper-V 3, the virtual machine CPU competition mechanism Windows Server 2012 is coming late. The latest Hyper-V 3 brings us more surprises, in the next three blog posts, we will learn about the virtual machine CPU competition mechanism. Part 1: CPU resources allocated to virtual machines; Part 2: Top CPU resources used by virtual machines; Part 3: compete for CPU resources; priority; VMS in the same host computer. When all or part of the resources are running, the competition for host machine CPU resources will be beyond reproach. How to balance the resource utilization of the host machine, Hyper-V3 provides three solutions: 1. CPU resources allocated to virtual machines (Vm retention percentage) www.2cto.com 2. maximum CPU resources used by virtual machines (Virtual Machine limit percentage) 3. resource priority (relative weight) in this example, three virtual machines are used, named "Windows Server 2008 R2", "Windows Server 2003 R2", and "Windows XP" respectively "..

Figure 1 CPU resources allocated to virtual machines CPU resources available to virtual machines (all resources are 100%). The administrator can allocate CPU resources available to virtual machines, that is to say, the CPU processing capacity is specified to a specific Virtual Machine (expressed in percentage ). The "retain Virtual Machine" option is provided in the virtual machine property settings. This setting ensures that the specified percentage is provided to the virtual machine. This setting affects the number of virtual machines that can run at a time. If multiple virtual machines are specified and the CPU resources used by the virtual machines exceed 100%, they are started sequentially, virtual machines that do not exceed the processing capacity of the physical CPU can be started normally. virtual machines that exceed the processing capacity of the physical CPU cannot be started. By default, after creating a virtual machine through the VM wizard, the virtual processor computing resource assigned to the virtual machine is one CPU by default, the Hyper-V 3 host determines the maximum number of virtual processors that can be used by each virtual machine based on the number of CPU cores (refer to the description of Windows 8 Server ). By default, "Virtual Machine retention (percentage)" is set to 0, and resources are not reserved for virtual machines. When the number of processors is confirmed, the virtual machines are given the maximum computing power. In practical applications, multiple CPU competitions are the most common. If each CPU uses the maximum processing capacity, the overall system performance may be degraded, or even the system crashes. Therefore, limiting the CPU computing power is an effective method.

Figure CPU computing capability test www.2cto.com for example, in the same host machine, the number of virtual processors is set to 4: l Virtual Machine (Windows Server 2003 R2) Set "Virtual Machine retention (percentage) "20%, 20% of the processor's data processing capability is allocated to the virtual machine.

Figure l if the reserved (percentage) value of a Virtual Machine (Windows Server 2008 R2) is 80%, 80% of the processor's data processing capability is allocated to the virtual machine.

Figure l if the reserved (percentage) value of a Virtual Machine (Windows XP) is 20%, 20% of the processor's data processing capability is allocated to the virtual machine.

The figure shows that when three virtual machines are enabled at the same time, the processor computing power is 20% + 80% + 20% = 120%, which will exceed the maximum hardware processor load. 1. When the First Virtual Machine (Windows Server 2003 R2) is enabled, the CPU processing capability required is 20%, and the virtual machine can be started normally. 2. when the second Virtual Machine (Windows Server 2008 R2) is enabled, the CPU processing capability required is 20% + 80% = 100%. The two virtual machines will occupy all the computing resources of the host machine, but it does not exceed 100%, and the second-born virtual machine can also be started normally. Both the activated virtual machines can run normally. Www.2cto.com 3. When a third Virtual Machine (Windows XP) is enabled, the processor computing power required is 20% + 80% + 20% = 120%, which will exceed the maximum hardware processor load. The third virtual machine cannot be started, and an error message is displayed, prompting that the virtual machine cannot be initialized and there is not enough resources.

Figure CPU usage mechanism VM retention (Percentage). When other parameters are set the same, the host machine forces the VM to allocate CPU resources. When 20% of the computing resources are granted to the virtual machine, 20% of the resources are exclusively occupied by the Virtual Machine. Other virtual machines cannot use the allocated computing resources. When a virtual machine runs important services, to ensure that the virtual machine has sufficient computing resources, assigning a CPU to the virtual machine should be a simple and effective method. Author Wang shujiang

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.