How many vCPU to asssign to my VMs

I have a Server 2012 R2 running on a HP Proliant Server. The server has 2 x Intel Xeon E5-2620 v3 @ 2.40 Ghz Processors.

It is running Hyper-V with two guest OSes. Both Server 2012 R2.

My questions is how many processors do I assign to each VM to get best performance.

One of the VMs is running SQL Express which I think is limited to running on servers with just one processor. How should I assign processors here?

These processors have 6 cores, is that classed as 6 processors? I really am unsure here.

Thanks
LVL 1
roy_battyDirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

it_saigeDeveloperCommented:
With hyper threading, you have 24 cores.

As for the question of how many processors.  It depends on the expected workload and compatibility that the dependent applications have for supporting SMP.  As for your question on SQL Express, according to Microsoft -
To determine the CPU count for licensing, SQL Server 2005 Express Edition only counts the physical processor chips in the computer. For example, SQL Server 2005 Express Edition counts a single-core CPU, a dual-core CPU, or an HT Technology-enabled CPU as one CPU.
Source

Which means that you are correct, SQL Express 2005/2008 on a hyper-v guest will only use one processor.  But that does not preclude you from using additional processors (say two or four) so that you can improve the performance of the guest OS.

Edit: That being stated - it appear that Microsoft has changed the rules in SQL Express 2012 and beyond.  The new rules now allow for "the lesser of 1 socket or 4 cores".  This means that on a virtual machine, SQL Express will use up to 4 cores.

More information can be found:
Features Supported by the Editions of SQL Server 2012
Compute Capacity Limits by Edition of SQL Server

-saige-
roy_battyDirectorAuthor Commented:
OK Thanks. I will be sign SQL Express 2012.

To clarify one VM is a DC for 35 users and will also be running SQL EXpress.

The 2nd VM is an RDS server publishing one application to 5 users.

Currently the VMs are set to "1" Processor each. What numbers should I put in this field presuming I am splitting the processing power 50/50 between VMs?

Is it 2 in each as the physical server has 2 physical processors or is it 12 in each, you said it had 24 cores in theory?

I
it_saigeDeveloperCommented:
Each Intel Xeon E5-2620 v3 has 6 physical cores.  Using hyper-threading, each physical core is treated as two logical cores.  6 x 2 x 2 = 24.

Read more about Hyper-Threading here.

I wouldn't worry so much about a 50/50 split in processing power.  Without knowing the setup of the hardware you actually have, I would say 4 cores per vm would probably be sufficient with 6 - 8 cores representing the sweet spot.  Anything more and you are most likely talking about overkill or mismanagement of resources.

-saige-
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Lee W, MVPTechnology and Business Process AdvisorCommented:
DO NOT assign 4 cores each.  Actually, that may be ok, but you need to understand how vCPUs are tasked.  IDEALLY, two CPUs per server... increase if needed but do so CAUTIOUSLY if you find the task manager for the VMs shows high usage of all CPUs.

The reason is that when you assign, for example, 8 vCPUs to a VM, that VM cannot execute ANYTHING until 8 cores on the host are IDLE.  The more cores you assign, the greater the potential your VM's threads will be delayed until that appropriate number of cores is available.  On a 24 core system, it should be pretty easy to get 2 available at any given time, especially in smaller environments.  Even 4 may be fine... you might even get away with 8 on ONE VM.  But for the best VM performance, keep the cores assigned to a minimum (I like 2 - in case one process goes nuts in the VM, the other core is available to handle the rest of the system's tasks.  If the nutty process is multithreaded, that could be a problem, but MOST processes are still single threaded and I personally consider that acceptable risk).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lee W, MVPTechnology and Business Process AdvisorCommented:
For more information and perhaps a better explanation, check out this article:
http://www.zdnet.com/article/virtual-cpus-the-overprovisioning-penalty-of-vcpu-to-pcpu-ratios/
it_saigeDeveloperCommented:
A very informative read Lee.  ;)

-saige-
roy_battyDirectorAuthor Commented:
I agree, very good article. So does Hyper-V have this symmetric multi-processing feature?
Lee W, MVPTechnology and Business Process AdvisorCommented:
Yes, SMP is the concept of having at least 2 CPUs (or vCPUs).
roy_battyDirectorAuthor Commented:
Thanks for the advice here guys.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hyper-V

From novice to tech pro — start learning today.