Processor setup/usage in Hyper-V

Posted on 2011-10-18
Last Modified: 2012-05-12
Hey everyone,

I'm not understanding how to properly setup the processors for the virtual machines in Hyper-V.  I've looked it up as much as I can and I don't seem to get a straight answer.  It seems like there's really no difference if I set up a server with 4 processors or 1 processor, or if I reserve a certain amount for the local processor for the virtual machine, etc.  What I don't understand though is that if I have a physical server with two quad core xeon's running 2 hyperv virtual servers each only using 1 processor what's the point?  Why not just buy a dual core CPU and call it a day.  

The flip side of that is if you setup an actual server on a physical box it needs those cores.  You can't efficiently run a physical server with 1 Processor.  

So if anyone can break that down for me it'd be hugely appreciated I've been trying to figure this out for a while now.

Question by:blue92lx
    LVL 41

    Expert Comment

    You should start by assigning just 1 vCPU for a VM. The reason is that there is a performance hit to having multiple CPUs in an OS; this is why Windows 2003 and earlier had uni-processor and multi-processor HALs. If your VM needs more processing power than what 1 vCPU can provide (task manager shows CPU consistently above 90%) then add another vCPU as needed.

    If you bought a dual quad core server for 2 VMs, you way over-bought on CPU. My dual socket dual core Xeon 5100 doesn't break a sweat running 10 VMs under 16 GB RAM on the host. Most CPU cores are mostly idle. Ditto for my other servers, which have up to 25 VMs and 144 GB RAM on dual socket, quad core systems. Most cores are mostly idle most of the time. Yes, you can probably run your two VMs on a single dual core processor just fine...good luck finding such a system these days.

    Author Comment

    Thanks for the reply.  No I didn't buy this server for my client, their last IT company did.  Not sure why.  I think it's just weird that in a VM you can use 1 processor efficiently for something like Small Business Server, but if you installed SBS on a single core physical server it would either crawl or not work.  

    Does the 1 vCPU actually share resources across the multiple physical CPU's?  Just trying to get an understanding for how this works.  I mean it doesn't really make sense that you have 10 VMs running on 4 cores.  That's like installing a server using 1/4 processor for each server.
    LVL 41

    Accepted Solution

    I think that a physical server would work fine on a single core. A single vCPU will only run on a single core at a time, but it can get moved to a different core. Since a CPU is generally mostly idle, you can run a VM on what is essentually 1/4 core or less.

    Author Closing Comment

    Thank you!!  That's the exact explanation I've been looking for.  So basically if I issue one CPU it's only using one core but it's really anywhere on the physical cpu at anytime and is utilized as necessary.  I don't understand how there are no websites explaining this, I couldn't even find a solid explanation on Microsofts side.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Few best practices specific to Network Configurations to be considered while deploying a Hyper-V infrastructure. It may not be the full list, but this could be a base line. Dedicated Network: Always consider dedicated network/VLAN for Hyper-V…
    This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…
    This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

    737 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

    15 Experts available now in Live!

    Get 1:1 Help Now