Link to home
Start Free TrialLog in
Avatar of Jay Thomas
Jay ThomasFlag for United Kingdom of Great Britain and Northern Ireland

asked on

CPU count recommendations from physical to virtual

Hi all. I have a best practice type question. I was recently advised that if I am moving a server payload from physical to virtual, not P2V but just spin up a 2012 virtual machine, install the apps, shut down physical in preference for virtual, that if the physical server has 4 CPUs you should factor a CPU increase in 1.5. So in my example I would produce the virtual box with 6 CPUs. My question is has anyone seen this documented anywhere. The advise comes from an extremely reliable source otherwise I wouldn't be looking into it. Any guidance or URL links verifying this would be much appreciated.
Thank you.
Avatar of Muzafar Momin
Muzafar Momin
Flag of India image

That source might have experience in a special application where this factor makes sense, but in general it does not. The number of CPUs is a matter of parallel tasks a machines can run. This does not change between physical and virtual.
Avatar of Ertan SENOYAR
Ertan SENOYAR

That depends your hypervisor, If it is type 1 Hypervisor (Vmware bare metal  server , Solaris LDOM etc.) you shouldn't expect such a overhead.

But for Type-2 hypervisors (virtualbox, vmware player) there is a overhead involved depending on your application / host opertion system /guest operting system type.

One can not put general rule that covers all of those platforms /Applications.

But if you are using type-2 hypervisor, guest OS translates requests to host OS, then host OS speaks to hardware through driver..

But on type-1 hypervisor, since virtualisation CPU instruction set enabled on BIOS level, guest OS can direct requests directly to Host CPU,
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Thomas

ASKER

As always top notch responses thank you all. I am going to read through the urls later this evening and then report back. But quickly, the outgoing 2003 server running 4 cores (not sockets as I stated wrongly above). The payload has been redeployed to server 2012 r2 but with a reduction of 50% CPU core. Now we are seeing CPU flat lining for 5 to 6 minutes at a time at application busy time (being used more). I have done as advised and tried to pull pre performance data to try and understand why the deduction to reduce the resource. Seems fairly obvious we are now running under specked. The outgoing system CPU was base lining 50/55% over a two week period pre migration. You see my point about the logic on reducing CPU resource. Doesn't make sense. Back to my original question, this recommendation came about whilst collating what had gone on. It was a general best practise across the board comment than one based around any particular application. Thanks all for now. Get back soon.
Okay, so how many vCPUs have you currently assigned ?

and make sure these are sockets, e.g. 4 Sockets x 1 Core.

What is the application which is running ?

and REMEMBER that virtualisation is a compromise, e.g. having many servers running on a single platform or hypervisor.

Is performance affected despite see-ing flat lining...

you will also start looking to look at performance parameters.

see this article

HOW TO:  Performance Monitor vSphere 4.x or 5.0

and maybe even getting under the covers, and checking with esxtop, to see if you have oversubscribed the vCPUs, or undersubscribed.

So there is not a direct answer to this without doing more homework, and checking performance.

and sometimes, even if you give the VM ALL the HOST resources it will never be as fast as the physical server!!!
Been on hols and haven't had time to read through these. Sorry for late feedback. I want to go through the answers properly and report back. Thanks for now.
not a problem, questions on topic please ask.
Hi Andrew. couple of questions if I may. if for example the esxi host had 4 physical sockets and all qaud core - 16 cores total. so I have my physical server being virtualise.  what is the difference from performance perspective of assigning 4 cores from one socket vs assinging 1 core from each socket so 4 cores total.  would it not be better to assign 4 cores from the same socket so the scheduler does not have to wait for each socket to be free to assign to the vmware? also, you mention an interesting point about licenses. if the license is not enterprise would vsphere not allow the assignment of say 8 cores? or would it allow 8 cores to be assigned but only use 4 of them, how does that work?

thanks as always.
The hypervisor that you've paid all the money for, wll do the best it can, and it's better to leave the hypervisor select the cores it uses.

What you are referring to is affinity where you fix a VM to use a particular host processor and core, which can be considered not best practice. By default the hypervisor will use cores from the total pool in the host automatically, based on how they are being used.

Licensing is a hard value, quite simply, you will not be able to allocate that number of vCPU (sockets) in the VM. If you exceed the number of your license, you will not be able to power on the VM.

But licensing is changing all the time between versions.
Need any more help with this question, to allow you to close out ?
Thank you.