Link to home
Start Free TrialLog in
Avatar of sglee
sglee

asked on

How to assign virtual processors in Hyper-v Virtual Machines

Hi,

 I have a HP Proliant ML110 G9 server with Intel(R) Xeon(R) CPU E5-2603 v3 @ 1.60GHz CPU and I am running Hyper-V with 4 VMs - SBS2011, W2012R2, WIn10 and  Win7.
Currently a single virtual CPU is assigned (by default) to each VM.  This CPU has have 6 cores.

 Should I assign more virtual CPUs to SBS2011 or/and W2012R2 TS and how would these VMs would benefit from having more than one core?

SB2011: Domain Controller, Exchange Server.
W2012R2: Terminal Server where users (up to maximum 8 users concurrently, typically 5 users)  log in and run applications programs like Quickbooks, Outlook Word, Excel, Internet Surfing, Printing.
 WIn10: Occasional login by single user
  Win7: Occasional login by single user
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America 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
Wow! Is this setup really workable?
The Exchange Server must be dragging.
Same for the TS with 5 users on there.
Unless this is just a test environment or not much load gets on there.

You definitely need to give more cores to both these VMs.
You haven't mentioned anything about RAM btw.

Maybe you need to think about remove the Win 7/10 VMs from on there..
Avatar of sglee
sglee

ASKER

SBS2011 VM has 24GB and W2012R2/TS has 12GB. Win10 & 7 have 4GB each.
All VMs are running well.
That's great then!
As Lee mentioned if you add at least 1 more core to each Server you will get better handling and avoid any peaks in processing in case a service or application suddenly grabs more cpu.
Avatar of sglee

ASKER

OK. I will add 1 more  core to each server.

Thank you.
Avatar of sglee

ASKER

After adding 1 more core to each virtual machine, I can tell the different. They respond much FASTER.

Since we are on the subject, I like to understand more about general rule of thumb with respect to how to assign vCPUs to VMs.
Say I have a server box with single INTEL CPU has 4 cores and I have one VM in my Hyper-V server.
Can I assign all 4 cores to that VM or should I assign 2 because I have to take Hyper-v server's CPU needs into the consideration?
Like in RAM situation, Hyper-v server needs memory and so do VMs. So if there are 16GB RAM in total for the server, I make sure I only use 12GB for VMs and leave 4GB for Hyper-V OS.

These days the server CPUs come with 6-20 cores. So say I buy a server with two physical CPUs and each CPU has 12 cores.
How metrics should I use to determine which VMs get how many physical CPUs and cores?
Never start with more than 2 and then monitor usage.  When a VM is given CPU time by the host, ALL physical CPUs (a core is considered a CPU) MUST be idle for that VM to be able to process.  If you have a 16 core system and you assign ALL 16 cores to ONE VM then if the host is using ONE core to process Windows Updates, the VM MUST WAIT for the update process time to end.  This causes the VM to slow down!  When you start with 2 cores, it's EASY for 2 of the 16 cores to be idle and therefore to allocate time to the VM.  It's probably easy for 4 or maybe even 8... but as a general rule of thumb, DON'T OVERPROVIDE what is needed.  Start with 2.  look at your performance.  If the 2 are really busy, add a third and/or 4th CPU.  re-evaluate.