2 Replies Latest reply on Feb 9, 2007 10:03 AM by RParker

    Comparing vCPU to pCPU

    troupa Lurker

      I'm doing some analysis of a few servers I have, and I have a question relating to to the comparison between vCPU and pCPU. The server I'm looking at has 2 physical CPUs, and when using perfmon this appears as 4 threads.

       

      My question is that only 1 thread peaks at about 95% now and then, and I'm wondering if I virtualised this machine whether I could expect similar performance on the vCPU, or whether I should expect approximately 50% utilisation (as the maxed out thread is only 1/2 of a processor)

       

      Any help would be appreciated.

       

      Andy

        • 1. Re: Comparing vCPU to pCPU
          wila Guru
          vExpertCommunity WarriorsUser Moderators

          So you have a single threaded application that maxes out on its thread?

           

          If you virtualize this application, the behavior will look the same from the inside of your VM e.g. the vCPU.

          However if you look at the pCPU then it doesn't have to be maxed out as the ESX scheduler makes the decision about the amount of time slices that your application gets.

          So with ESX you are able to use more of your processor (it doesn't get stuck in this one process)

           

          Its not that ESX will balance your single-threaded application over multiple threads / CPU's, if that's what your after.

          At least, that's not my understanding

          | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
          | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
          | More info at https://www.vimalin.com
          | Twitter @wilva
          | VMware Wiki at http://www.vi-toolkit.com
          • 2. Re: Comparing vCPU to pCPU
            RParker Guru

            You have a hyper threaded CPU.  This means that the logical CPUs (1, 3) are basically idle times and they will kick in when the pCPU need additional help, then it will use the logical CPU.  They are NOT full cycle CPU's, don't expect them to give you any more than a 20% boost if that, this is one reason why hyperthreading may not work well for ALL VM's.

             

            This is actually an argument for why I purposely assign CPU (using affinity) on machines that enable hyperthreading, so I KNOW I am getting a full cycle pCPU.

             

            Toy around with the settings in a VM, but leave hyperthreading ON (ESX host) and only use hyperthreading sparingly, (not for every VM you create).

             

            NOTE:  In the ESX world, logical and physical CPU's are treated in logical order, in the Hardware world (physical machines) they are enumerate as Physical FIRST \*THEN* Logical.  So in your case, 0, 2 are the physical CPU, and 1 and 3 are logical.  On a machine installed bare metal with windows you will note that 0,1 are the Physical CPU and 2,3 are logical.  This is important because if you are used to setting affinity for a process, the VM will behave differently because the CPU's you are using are NOT going to be in the same order.  Just be aware of this.