Vsphere allocates virtual machine CPU resources correctly

Source: Internet
Author: User

in the VMware VSphere environment, if the hardware resources of the virtual machine system are improperly configured, it will have a great impact on the performance of the systems. , the hardware resource configuration mainly includes CPU, memory, hard disk, network adapter and so on. Based on the author's personal experience, this paper analyzes how to allocate CPU resources correctly.

650) this.width=650; "title=" vsphere1.jpg "alt=" wkiom1vjnhayni2iaaehremwj_a757.jpg "src=" http://s3.51cto.com/ Wyfs02/m00/6c/74/wkiom1vjnhayni2iaaehremwj_a757.jpg "/>

First, CPU Resource Description

VMware VSphere assigned to the virtual machine CPU number refers to the number of logical processors. The total number of logical processors owned by each host (server) is different, for the number of physical CPUs x per CPU (CORE) x Hyper-Threading factor, when the hardware supports hyper-threading and when Hyper-threading is turned on in the BIOS, The Hyper-threading factor is 2, otherwise 1. For example, when a server is 4C 8 core and it supports Hyper-threading, its CPU core is only 4x8=32, the number of slots is the number of CPUs =4,vsphere the number of logical processors that can be allocated for this host is 4x8x2=64. :

650) this.width=650; "title=" vsphere2.jpg "alt=" wkiom1vjnpcylvw3aab8cieq2dq092.jpg "src=" http://s3.51cto.com/ Wyfs02/m01/6c/74/wkiom1vjnpcylvw3aab8cieq2dq092.jpg "/>

Host 4C 4 examples of cores that do not support hyper-threading are:

650) this.width=650; "title=" vsphere3.jpg "alt=" wkiol1vjnxftahofaab7ddmcfew081.jpg "src=" http://s3.51cto.com/ Wyfs02/m02/6c/6f/wkiol1vjnxftahofaab7ddmcfew081.jpg "/>

Host 2C 6 examples of cores that do not support hyper-threading are:

650) this.width=650; "title=" vsphere4.jpg "alt=" wkiol1vjn0zg6figaab-p-adfde813.jpg "src=" http://s3.51cto.com/ Wyfs02/m00/6c/6f/wkiol1vjn0zg6figaab-p-adfde813.jpg "/>

Second,theCPU Resource Allocation

VSpherethe logic assigned to the virtual machineCPUnumber equals number of slotsxthe number of cores per slot, where the number of slots cannot be set directly, can be set indirectly by adjusting the other two quantities. such as allocation4a logicalCPUto a virtual machine, you can set the number of cores per slot to1, the number of slots is automatically set to4, such as the number of cores2, the number of slots is2, such as the number of cores4, the number of slots is1.

650) this.width=650; "title=" vsphere5.jpg "alt=" wkiol1vjoapt9chnaag4h6zevbm563.jpg "src=" http://s3.51cto.com/ Wyfs02/m02/6c/6f/wkiol1vjoapt9chnaag4h6zevbm563.jpg "/>

Distribution Principles 1 The number of slots cannot exceed the number of CPUs in the host , otherwise the number of redundant slots is invalid.

Distribution Principles 2 The number of cores per slot must not exceed The number of cores on each CPU x Hyper-threading factor.

in the VSphere , once you violate one of the two principles above, assign a virtual machine to the actual CPU The number will be less than the displayed CPU number. at the same time, when the virtual machine is vMotion , the hardware resource configuration of the destination host is also considered.

cpu 1 slots, in fact the system can only be in one physical Span style= "FONT-FAMILY:CALIBRI;" >CPU

Once encountered a similar situation, the assigned cpu number is 8 8 1 , System boot is normal, but run database application when the query response is very slow, the user is not acceptable. After optimization, cpu total 8 2 Span style= "font-family: ' The song Body '; >, the number of slots is 4 , performance improved significantly, query response quickly.

Another: It is strongly recommended to select "Enable CPU Hot add" so that the CPU can be manually added online when the virtual machine is running low on CPU COMPUTE Resources quantity without downtime. If you do not select this option, if you want to increase the number of CPUs , you can only manually add the virtual machine system before it is down.

Conclusion

Configuring a virtual machine in a vsphere environment CPU resources, take full account of the host hardware CPU allocation of resources, combined with the application requirements of virtual machine system, reasonable distribution CPU resources to ensure that both computing needs are not wasted.  

This article is from the "sky High bird fly, sea wide with diving" blog, please be sure to keep this source http://xjlegend.blog.51cto.com/59163/1642460

Vsphere allocates virtual machine CPU resources correctly

Related Article

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.