Solved

VMWare and physical cores?

Posted on 2015-01-09
12
531 Views
Last Modified: 2015-01-10
Hi,

I'm using VMware V9 with a CPU that has 4 physical cores.

Let's say that I have 3 VM's, and I specify that each VM gets 2 processors. If I fire up all 3 VM's, they are obviously going to claim more cores than I have. How does VMware reconcile this? Does it throttle access to the cores or something like that?

I also noticed that there is a field for "Number of cores per processor". Does that refer to HyperThreading?

What's the best practice when distributing resources to the VM's?

Thanks in advance.
0
Comment
Question by:Go-Bruins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
12 Comments
 
LVL 120

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 350 total points
ID: 40541276
Always allocate "sockets" not cores.

(simplified!)

1 vCPU (socket) = approx 1 physical core on the physical CPU, but not for all of the time, the hypervisor could scheduled that timeslice on any core in the host.

The Hypervisor, has something called a CPU Scheduler, and it robs CPU time, from all the physical cores in your Host, and offers them to the VMs.

Do *NOT* overallocate processors in the VMs, start with a single processor (socket), 1 vCPU and increase if you require additional performance.

Very few VMs need more than 1 or 2 vCPUs!

here's a nice article with screenshots, which makes it a little easier to understand

http://www.virtuallycloud9.com/index.php/2013/08/virtual-processor-scheduling-how-vmware-and-microsoft-hypervisors-work-at-the-cpu-level/
0
 

Author Comment

by:Go-Bruins
ID: 40541296
Thank you. So when you use the term "vCPU (socket)", that's analogous "Number of processors:" in VMware, correct?

Snapshot
0
 
LVL 120
ID: 40541319
Correct, it's displayed a little different in VMware Workstation to vSphere.

But yes virtual processors = sockets = vCPU.
0
Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

 

Author Comment

by:Go-Bruins
ID: 40541334
And the "Number of cores per processor" refers to HyperThreading, correct? If so, how should those be deployed?
0
 
LVL 120
ID: 40541390
Cores is a reference to cores on the physical processor.

if hyperthreading is enable on your processor, you will usually have double the cores.

I would only recommend using cores, if you have a license requirement based on cores, whether you select processors (sockets) or cores, the performance is going to be the same, it's there to maintain license conditions, where it states, licensed for 2 cores.
0
 
LVL 5

Assisted Solution

by:Dawid Fusek
Dawid Fusek earned 150 total points
ID: 40541939
"I also noticed that there is a field for "Number of cores per processor". Does that refer to HyperThreading?

What's the best practice when distributing resources to the VM's?"


There are different best practices for different purpose, workloads and vendors but in most cases real world for CPU/cores/HT and vCPU it looks like this (data for vMware ESXi v5.x hypervisor, info for VMware Workstation below):
- CPU is a physical socket, core men CPU physical core in CPU, and vCPU mean Virtual Cores or Virtual CPU in the VM (it's as Andy described quite the same only for SW licensing purpose, probably specially for MS and ORACLE)
- if buying server for VMware ESXi hypervisor bought CPU (or CPUs) with as much cores as possible for your budget and with HT (but better more cores than HT)
- HT doubles a threads which is really good for VI, so in ESXi hypervisor U see doubled "logical processors", but this not mean that it doubles number of cores, if U calculate U may think a HT is a 1/4 of 1 core, so 4 cores with HT U may use to calculation like 5 cores - that's my own opinion from my practice and knowledge
- ESXi host BIOS - Enable all cores and HT
- ESXi hypervisor console - enable HT if disabled (ESXi host/configuration/hardware/processor/properties)
- use vCPU to core (physical) ratio up to 4-5:1 for all runing VM's (in truly if U don't have a lot of memory it's hard to achive it running 2 vCPU VMs), if U have old server slow CPU or low ammount of cores and no HT use lower ratio maybe 2-3:1, faster/newer CPU per core U have = bigger ratio vCPU to core U may try to achive
- use 1-2 vCPU for most VM's if evidently there is no real need for more, 2 vCPU is best option in my opinion (VM's are more responsible), I have 450 VMs on my lab/soho environment, with active 100-150 VM's and 90% of them have 2 vCPU, 8% have 1 vCPU and only 2% have 4 vCPU, sure if someone have huge DB (virtualized what is not ideal options but happens) or a huge web server (what is still not ideal candidate for virtualization in my opinion) one may use up to 32 vCPU if the server have such ammount of cores

for example on my main 2 servers with 2x 6 core CPU with HT I have 12 cores per host and 24 logical processors per host, and I easly and smoothly running 80 vCPU per host and sometimes it happens up to 100 vCores per host, it still working but performance is degradated, so 80 is ok for my CPUs (2.2GHz) so in my calculation vCPU to core (physical +1/4 HT=core) it's 5.3:1 and riching 6:1 I can see performance degradation.

In VMware Workstation situation is similar but in this scenario I will use lower vCPU to core ratio like up to 2:1, and as I described above it also depends of CPU speed and.

regards
NTShad0w
0
 

Author Comment

by:Go-Bruins
ID: 40542488
Thank you. I'm beginning to get a grasp on sockets, cores, and VM's.

This is just a testbed for me to learn VMware, so allow me to pose another theory based question:

Let's say I'm running VMware on am AMD 8350, This CPU has 8 cores and not HT (I think). Let's say a single socket MB with 32GB of RAM. I'd like to test run maybe Server 2012, and three Win 7 x64 machines.

What values should I put into the two fields?

thanks.
0
 
LVL 120
ID: 40542494
Start with 1 Processor, 1 Core, if you require, more performance, add another processor, to 2 Processors.
0
 

Author Comment

by:Go-Bruins
ID: 40542502
Great, Thank you.

1. Sum can never exceed 8, correct? Or is it 7, as the host machine uses one? and each machine gets same, regardless of OS?
1. What if I had an Intel cpu - 4 cores with HT?
0
 
LVL 120
ID: 40542556
1. Correct (it will not let you exceed what physical cores you have in the host!)

2. Same as 1.
0
 

Author Comment

by:Go-Bruins
ID: 40542621
Thank you so much.

Andrew, I read one of your articles about converting physical and virtual machines to the Microsoft Hyper-V format.

Do you prefer the Microsoft offering over VMware?
0
 
LVL 5

Expert Comment

by:Dawid Fusek
ID: 40542778
Go-Bruins,

"1. Sum can never exceed 8, correct? Or is it 7, as the host machine uses one? and each machine gets same, regardless of OS?
1. What if I had an Intel cpu - 4 cores with HT?"


1. sum on single VM can never exeed sum of logical cores that physical CPU have (so if U have your AMD with 8 physical cores without HT, AMD don't have HT same like Intel, it have something called HT but it's something else), then on single VM U may use up to 8 vCPU ("Number of processors" or "number of cores per processor" in VMware Workstation)

2. if U have intel CPU with 4 cores and HT, U will have 8 logicar cores so in single VM U have also a limit up to 8 vCPU  ("Number of processors" or "number of cores per processor" in VMware Workstation)

But as we inform U sooner:
- it's not recommend and needed in most cases to exeed 2 vCPU  ("Number of processors" or "number of cores per processor" in VMware Workstation) per single VM
- U can exeed your logical cores/logical processors with for example sum of 9 VM's, and as I type U before for VMware workstation I will use a ratio up to 1:2, so for example for 8 cores CPU/4 cores CPU with HT and 9 VMs, U may use summary 16 vCPU  ("Number of processors" or "number of cores per processor" in VMware Workstation) so 7 may have 2 vCPU and 2 should have 1 vCPU (sum will be 16 vCPU)
- vCPU are shared so they will not eat your physical core and for example in vmware workstation can't have anything for Windows host system, no, they are shared so working as an appliaction (U may run much more applications at once than physical or logical core your CPU have)
- if starting with Virtualization, build your workstation with 32GB of ram and instal here ESXi hypervisor (it's boot from USB, like a linux) and then it's managed very easy and flexible from VMware vSphere Client from your Windows laptop, You can download ESXi hypervisor and Your Free license here (U need to register):
https://my.vmware.com/web/vmware/evalcenter?p=free-esxi5&lp=default

Then U will discover new world of virtualization,  when U can run ten's of system at once or just save them as a VM and run when U want, Virtual Appliances from different software and hardware vendors, unlimited possibilities to test, evaluate,show, share and use in production, and everything on single PC (or server) :P.

have fun mate

regards
NTShad0w
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question