2

Primarily I have two questions relating to VMware/virtual machine's CPU usage:

  • How is it calculated?
  • Which numbers under which tabs of vCenter (vSphere client) window are referenced?

Please also clarify if my understanding summarized below is correct or not.

Q1

Please clarify if following understanding of mine is correct or not:

  1. a physical CPU is namely corresponding to 1 core (embedded in a CPU socket)
  2. a VM machine (or a guest OS) recognizes/handles its CPUs always at a virtual CPU level (a virtual CPU is noted as vCPU below).
  3. a vCPU is also called a logical CPU (or processor), a synonym to each other.
  4. When HT is NOT enabled, 1 vCPU = 1 physical CPU (or 1 core)
  5. When HT is enabled, 1 core spawns 2 threads, and 1 thread just looks like/acts as a vCPU seeing from a VM machine, in a word, 1 core provides 2 vCPUs in this case.

Q2

Calculation of CPU usage for either a VM machine, a host, or a host cluster is simple by simply working out A/B, where A - used amount, B - total capacity.

Question is: in the case of a VM machine, where to find out info of A and B? which tabs, which metrics / counters on vCenter window?

Data

Listed below are possibly relevant items (data from a real VM system), please show me which is A, which B:

Under Summary tab of a VM machine ("V-mch"):

  ** General section **
       Guest OS:     MS Windows Servers 2008
       CPUs:         2 vCPU
       Memory:       4096 MB
         .......
       Host:         "hst"

  ** Resource section **
       Consumed host CPU:      43 MHz
       Consumed host memory:   4149.00 MB
       Active guest memory:    327.00 MB

Under Summary tab of the host "hst" ("V-mch" is attached to):

  ** General section **
       Maker:              Dell Inc.
       Model:              PowerEdge M620
       CPU core:           20 CPUs x 2.199 GHz
       Processor type:     Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20 GHz

       Processor socket:   2
       Cores per socket:   10
       Logical processors: 40
       Hyper threading:    valid (enabled)

  ** Resource section **
       CPU used amount:  9016 MHz
       Capacity:         20 x 2.199 GHz

Is my following guess correct, for where information A and B is derived from?

A  -  Consumed host CPU: "43MHz"
B  -  CPUs: "2vCPU"  +  Capacity: .. "2.199GHz"

Thanks for reading through lengthy text and advising.

Seth
  • 9,393

2 Answers2

0

This question seems to be a mess and the original was copy pasted from a different format. So maybe try to improve the formatting further and try to get a clear understanding of what you're actually asking.

Question 1

  1. No. A physical CPU is a CPU with all its cores.
  2. Yes while technologies like VT could be used to give it a more direct hardware access to it.
  3. A logical CPU is a more generic term.
  4. Yes but HT is a separate technology. You can have multi CPUs per VM and multiple Cores per Socket per VM. This would be independent from the Host as far as I know.
  5. See 4.

Question 2

You'd have to decide in which relation you want to view the CPU usage. To you want the percentage of usage for the host or guest? Depending on it your B would change.

You're correct that A and B would be the numbers you need. But you could either view the CPU consumption as a total of the available power for the host or VM. B would be the number of cores times the max frequency of a core. Depending on whenever you want the information in relation to the cluster as whole or for an individual VM you would either use the number of cores of the VM or of the host. The latter might be interesting to find the VMs that cause the biggest current load on the host.

For individual VMs there is a chart available under Monitor => Performance which uses the number of cores per VM. A documentation is available for every default graph and some of the data that is being used.

For a host you can view that information on the same tab but you need to select a individual host instead of a VM. For a whole cluster it doesn't look like there is a default percentage graph but instead just a usage vs. total graph in absolute numbers (again available through the same tabs).

Seth
  • 9,393
0

Since Seth already answered Question 1, i'll provide an answer for #2. If you click the host or cluster in the vSphere web console you can determine the total capacity (metric B in your question) from the Summary tab. On my system it is 43.98Ghz. And If you select the virtual machine you can determine how many cycles per second of CPU it is using (metric A) from the Summary tab. On my Cisco vWLC VM it is 43 Mhz. In addition if you select the VM, click the Monitor tab, and then the CPU Usage (Mhz) graph you can see the historical CPU usage in Mhz over time. You should also be able to determine this information from querying the SQL database.

enter image description here enter image description here enter image description here

Muh Fugen
  • 500
  • 5
  • 13