VMware vSphere

 View Only
  • 1.  Vcpu vs Core option

    Posted Mar 22, 2012 10:26 PM

    Hi All,

    I'm trying to get my head around the functionality difference between the two and could use some help.

    My understanding is if I have a machine with 1VCPU and 1 core the VMkernel will schedule
    cpu on one core of only one physical processor, if it has two VCPU's and one core it
    will schedule on two cores of one processor.  I guess a better way of putting it does it switch between which
    physical processor core it's using with only one VCPU or is it tied to one core on one physical processor?

    My understanding is the virtual cores doesn't impact performance as they increase as this is just the OS seeing
    the additional cores vs Vmware processing CPU cycles behind the scenes, am I correct?  A developer sent me
    this info saying this wasn't true for threads with SQL server 2012 and it needs to see additional cores for
    performance and licensing, I buy the licensing but not sure there is any difference in performance
    giving a machine 4VCPU's if needed vs 4 VCPU's and 4 sockets.  Ultimately what would be
    the difference between 4 virtual cores and 1 VCPU we 1 virtual core and 4 VPU?

    Here is what the developer said, thanks for the help.

    This is because SQL server looks at the core count and uses that to manage the thread pool.  Even though the core may operate across a hundred CPUs in a VM environment, SQL server cannot interpret the difference.  SQL server allocates a maximum number of file access threads based on the cores, so one core means one thread.  When you move to 8 cores, SQL will give 8 threads the opportunity to access files.  So, when we create 8 files in the file group and 8 cores, there is a true 8 thread, multithread file access going on.  In addition, SQL server distributes the table data across all 8 files using its own logic and in doing so, creates a raid of the data across the files and UNC shares.  



  • 2.  RE: Vcpu vs Core option

    Posted Mar 23, 2012 01:54 AM

    First thing to clear up some terminology:

    Physicl Core - self explanatory

    Hyper Thread - self explanatory

    LCPU - Logical CPU this is either a core or hyperthread where a vcpu can be scheduled to run on

    so if you have 4 vcpus or 1 vcpu with 4 cores on a vm - each core/vcpu will run on an LCPU -  to the OS and any application each vCPU/virtual core will appear just as that as a core so a SQL server will be able to each effectively and the vmkernel will schedule the vcpu/virtual core to available physical cores in the esxi host.

    The major reason for this is to help with software licensing in that the majority of software companies license there software to the number of cpus - so by having a vcpu with multiple cores you will be to use a single cpu license for the osftware but still have it use multiple cores -



  • 3.  RE: Vcpu vs Core option

    Posted Mar 23, 2012 02:38 AM

    Prior to vSphere 5, each vCPU appeared as a unique socket to the VM, thus 4 vCPUs would look like 4 processor sockets. You could change this behavior using a configuration tweak, but it was not available in the GUI.

    Either way, a vCPU is still scheduled on a host's physical core based on rules defined by the vmkernel resource scheduler.