Solved

CPU / sockets settings for two Hyper-V guests on a dual CPU/quad core host

Posted on 2014-02-27
10
2,186 Views
Last Modified: 2016-11-23
hi all,

I've been  reading for some hours but i am totally confused with all the conflicting info.

I have a new Dell server with two quad core CPUs running Server 2012 R2 standard.  I have created two Hyper-V guests on this server, one is another Server 2012 R2 Standard instance (which will be a terminal server) and the other is SBS2011.  The host server does nothing except run these two hyper-v guests.

I'm trying to understand the best way to set up the CPU allocation to these guests and am confused about the "sockets" and NUMA stuff.  The host system effectively has 8 cores in total.  Should I set both guests to use 8 sockets?  Currently they are both set to use 4 sockets, but i am concerned I may not be using all the hosts resources.

Once that is worked out, should i play with any reserve values, or just let hyper-v manage it unless i encounter an issue?

thanks in advance!
nathan
0
Comment
Question by:natrat22
  • 4
  • 3
  • 3
10 Comments
 
LVL 38

Accepted Solution

by:
Philip Elder earned 400 total points
Comment Utility
We would assign # Cores - 1 vCPUs to SBS 2011 Standard. 16GB vRAM to 24GB vRAM depending on user count.
We would assign 4 vCPUs to the R2 Standard for RDS. 2GB vRAM + 512MB/User for RDS.

RAID 6 across 10K SAS spindles with a minimum of 6 but preferably 8 would be a good place to start. Hardware RAID with battery backed or non-volatile cache.

You have one more license to use for virtualizing another guest based on the host (1+2).

Philip
0
 
LVL 1

Author Comment

by:natrat22
Comment Utility
Hi Philip, thanks for your reply, I'm a big fan and read a lot of your stuff on third tier and elsewhere :)

Did you mean 3 cores - 1 vCPU in the first line?  I'm confused as to how to do that in Hyper-V.  The options on the main settings section is simply "Number of virtual processors".  No reference to cores.  the screenshots attached show the current settings.
Capture.JPG
Capture2.JPG
0
 
LVL 38

Expert Comment

by:Philip Elder
Comment Utility
To the CPU a virtual CPU (vCPU) = 1 thread.

As a rule one thread runs through the pipeline via one physical core on the CPU (with some shenanigans presented by Hyper-Threading).

So, what we do is take the number of physical cores - 1 to set maximum number of vCPUs assigned to a VM. So, in your case we would assign a maximum of 3 vCPUs to a VM.

NUMA and memory assignment has to do with available RAM attached to a specific CPU. If that RAM is relatively full and a VM comes online that requires more RAM than available at that CPU its vRAM is shuffled over to RAM associated with another CPU. This shuffle costs CPU cycles.

In my experience when the processing logic has to shuffle vCPU threads between CPUs (they _have_ to be processed parallel in the pipeline) or RAM between CPUs performance gets compromised during those shuffle cycles.

Philip
0
 
LVL 74

Assisted Solution

by:Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy earned 100 total points
Comment Utility
One thing I notice from your screen shots is that you only have about 14GB of RAM allocated to your SBS.  You may find that is not enough (depends on how many users, and other factors) so I would keep an eye on the performance of the SBS and increase the RAM if you are having issues.

Be aware though, as Philip alluded to above, RAM is attached to a specific CPU.  I've found that it's best to keep amount of RAM balanced, so if you currently have 32GB of RAM in the server (16GB in each bank), add RAM to both sides if you add any at all.

These days, the cost of RAM is plenty low enough compared to the additional performance you get -- having plenty in place generally avoids needing to even worry about the allocation you are asking about.
0
 
LVL 1

Author Comment

by:natrat22
Comment Utility
Its a small small business :)   Around 10 users - I've been running SBS2011 with 12GB RAM for businesses of that size on physical hardware without any issues for a while so I figured 14 would be plenty for the VM.  I also do some memory tweaks on all my SBS installs - setting a max RAM use for exchange store for example, which just runs rampant otherwise.

I did originally try to add 14GB to each VM but it said there wasnt enough RAM, even though there is 32GB in the system.  I've yet to investigate that, I'm sure theres some way to sort that out.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:natrat22
Comment Utility
Philip i hadn't seen anywhere in my searching a reference to using physical cores minus 1 for vCPU allocation.  Whats the logic behind this?  Is it effectively keeping a core free for the host?
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
Comment Utility
If you've been running fine with 12GB, then definitely you will be okay with 14GB for your VM.

The reason you may have had trouble assigning 14GB to each VM is related to what Philip said about NUMA above.  Your machine may have 32GB, but there are only 16GB per processor.  If you assign the VM to a specific processor then it will only have 16GB available and if your host is taking up a couple, then it won't have quite enough to give you 14GB.

This is why in a small environment, I generally just let Hyper-V handle things in the default manner.  Because with only 10 users, I doubt you will experience any performance issues which would require you to do any additional fine tuning.
0
 
LVL 1

Author Comment

by:natrat22
Comment Utility
Thanks, but i did just let hyper-v do everything.  I set up the first VM with 14GB, and all other settings default.  then I tried to set up another VM with 14GB and it wouldnt let me do it, hence dropping it back to 12.  As I said I'm sure there is a way to fix that, i just haven't got around to researching it yet :)
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
Comment Utility
I just explained above why you couldn't do it... what more do you need to research?
0
 
LVL 38

Expert Comment

by:Philip Elder
Comment Utility
Our practice of #Cores - 1 for total vCPUs comes from a few things.

One was a Hyper-V performance discussion via TechEd about 5 years ago that is no longer available. In that discussion we learned that the CPU pipeline must process VM threads (vCPUs) in parallel through the entire pipeline (CLOCK_WATCHDOG_TIMEOUT was the result of threads getting out of sync blog post).

Also in that discussion was how the pipeline juggles the various thread sets for each VM.

Essentially, the CPU pipeline scheduler has a little more room to work when there is at least one core available.

Philip
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
It Is not possible to enable LLDP in vSwitch(at least is not supported by VMware), so in this article we will enable this, and also go trough how to enabled CDP and how to get this information in vSwitches and also in vDS.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now