VMware vSphere

 View Only
  • 1.  Question about best practices for vCPU allocation

    Posted Dec 03, 2014 12:47 AM

    I'm relatively new to managing ESXi servers and I was hoping one of you could help explain some of the best practices as far as allocating vCPU sockets/cores inside of ESXi 5.

    Here is my setup.

    Dell PowerEdge R720 server with ESXi 5.5.

    dual 6 core 3.50GHz processes with Hyperthreading active giving me 24 logical processors

    On my server I'm currently hosting 17 active machines with a total of 32 virtual sockets. Some of the servers have multiple cores with the sockets as well. Is there any issues with over allocating the virtual sockets or do I need to make sure that the number of virtual sockets I have is equal to my logical processors?

    Thanks for any help you can give me.

    Don



  • 2.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 01:14 AM

    Actually you have only 12 logical processors, 6 per cpu, hyper threading will give you a total of 24 but I read that you shouldn't take that into account. I have seen a ratio of 4 vCPU per logical processor and the general advice I have read is to allocate one vCPU with one vCore to your VM and monitor usage and add more vCores as needed. VMware is very efficient at scheduling CPU utilization, but I wouldn't want to over allocate CPU's unnecessarily either, so finding a balance through monitoring is what I would suggest.



  • 3.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 04:06 AM

    Do you have chance to use VCOPs product? (Not hoping to buy it for one ESXi  :smileyhappy:  )

    Reports from vCOPs will help you in more efficient way to understand these situations.

    Over Provisioned vs Under Provisioned VM's



  • 4.  RE: Question about best practices for vCPU allocation

    Broadcom Employee
    Posted Dec 03, 2014 05:10 AM

    Please read ESXi CPU consideration best practices from below white paper

    :http://www.vmware.com/pdf/Perf_Best_Practices_vSphere5.5.pdf

    Above white-paper section should clarify all your doubts.

    Also on vCOPS, vCOPS foundation edition is free of cost:

    Foundation edition offers below features:

    Foundation Edition – will give you insights and visibility into performance and health of your vSphere infrastructure. Features included are:

    • vSphere Health Monitoring
    • Self-learning Performance Analytics
    • Intelligent Operations Groups (NEW)
    • Proactive Smart Alerts.

    Refer:Compare vRealize Operations Editions | United States



  • 5.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 05:35 PM

    I looked over the white paper and I'm still confused about one thing. When it talks about vCPU is it talking about sockets on the virtual machine or total number of cores. Meaning if I have a server with 2 sockets and 6 cores would I say 12 vCPU or only 2 since that is the number of sockets?



  • 6.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 05:42 PM

    Think of a vSocket as a CPU, when you create a VM you start with one socket and one core, you can add more vSockets which would be like adding a second CPU, or you can add more cores which are like cores in a physical CPU. In your example with 2 sockets and each socket having 6 cores, you could say 12 CPU's but really its still 2 CPU's with 6 cores each, cores don't count as CPU's they are add ons to CPU's that help with hyper threaded applications and cpu processing.



  • 7.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 06:12 PM

    Ok, perfect. So I think I understand that. So if we use my last example of the VM with 2 sockets and 6 cores that would only be utilizing 2 pCPU on my host is that correct? By adding the additional cores it is "splitting up" the pCPU to present it VM. Does that sound correct? If I use the estimated 4 vCPU per logical would that include cores or only sockets?

    I'm thinking I may be to over-provisioned on one of my hosts which may be causing slowness for one of my CPU intensive servers. In my original post I gave my setup which shows 12 logical processors (with Hyperthreading enabled). My machines are using 32 virtual sockets and a total of 51 cores. My biggest concern is my SQL server which is currently provisioned for 2 sockets with 9 cores giving me a total of 18 processors. I have moved some of my servers to other hosts so I'm now at 26 virtual sockets with 45 cores.

    Don



  • 8.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 06:17 PM

    I cant answer your question but to say that the ratio I have seen is four vCPU's per physical core, so in other words you could create four vm's each with one socket and one core and this would use only one physical core of your physical CPU.

    It does sound to me that you have over provisioned your vm's on CPU's. What OS are they running? If its 2008/2008R2 or newer, you can safely scale back to perhaps one socket and two cores and see how the performance is and if necessary add more cores. From my experience, SQL is more memory and I/O intensive then CPU.



  • 9.  RE: Question about best practices for vCPU allocation

    Posted Dec 03, 2014 08:43 PM

    Let me try to clarify this:

    Each VM core is a vCPU. Each physical thread is a Logical CPU. If you have a dual 6-core with HT enabled, you have 24 logical CPUs.

    Each vCPU you have maps to a logical CPU. SOif you have a VM with 2 sockets and 6 cores each, you have 12 vCPUs, each one mapping to one of your 24 logical CPUs. VMware SUPPORTS 32 vCPUs on each logical CPU, although this *may* be too much for a production environment. You will need to check if you are having CPU contention, and the document on vSphere performance will help you understanding this. Basically, you will have to check if you are having high RDY and CSTP times on esxtop inside your command prompt (above 5%).

    Multiple CPU are always not good for VMs, unless really needed. You should not use more than 1 vCPU per VM, only if you see a real need for that.

    Hope this helps understanding a little bit more.

    Marcelo