VMware
 

Knowledge Base

Search the Knowledge Base:

Products:
Search In:
 

CPUPerf and CPUPerf2 Time Fields

Details

I do not understand the use of the time fields System, Wait, Ready, T1, and T2 in CPUPerf and KCPUPerf2 in VMware Infrastructure SDK. Can you provide additional information?

Solution

This article describes the following CPUPerf time fields. The PCPU and Used fields are self-explanatory and are not covered in this article.

  • System
  • Wait
  • Ready
  • Physical time (T1 and T2)

System

The System field for a virtual machine indicates the time that the VMkernel spent performing work for that virtual machine. This consists primarily of time required to perform network and disk I/O operations.

  • Used time includes System time.
  • Not all VMkernel time is measured. Mostly just network and disk I/O is measured.
  • System time typically includes work done on behalf of one virtual machine while executing in another virtual machine’s context.

VMkernel time is used for a network interrupt to receive a packet for virtual machine B while virtual machine A is running. This time is subtracted from the Used time for virtual machine B, and added to the System and Used times for virtual machine .

Note: Subtracting System time from Used time does not equate to what the virtual machine would have spent on an equivalent physical box. This value does not capture monitor overhead, which is dependent on the particular workload. Also, not all VMkernel time is measured and included in the field values.

Wait

The Wait field shows the time a VCPU is either idle or blocked on some event, such as an RPC to the COS, or a SWAP IN from disk. In most systems, the overwhelming majority of wait time is due to the guest explicitly idling. Some versions of ESX Server break out idle time separately.

Ready

The Ready field indicates when the VCPU is ready to run, but not currently scheduled. This means that there is contention for physical processors. This happens, for example, when there are more CPU-bound guests than there are physical processors. On overcommitted systems, guests with smaller resource allocations typically accumulate more ready time than guests with larger resource allocations.

It's normal to have some amount of Ready time, even in systems with some idle time (due to correlated loads in guests).

If there is a huge amount of Ready time plus a huge amount of system idle time, it is useful to investigate a cause and correct the contention.

Physical Time (T1) to Physical Time (T2)

The T1 and T2 fields indicate the elapsed time between two points, T1 and T2. This is not exactly equal to the values of Used + Wait + Ready.  If hyperthreading (HT) is disabled, this formula is approximately correct.

On systems with hyperthread enabled, CPU consumption is charged in terms of core seconds, not in terms of simple elapsed time running on one LCPU (hyperthread).

In general, if two VCPUs, A and B, are running in different LCPUs on the same core, then each is charged for using half the core. For example, if 10 milliseconds of core time is used, VCPU A and VCPU B are each charged for using 5 milliseconds. This makes accounting the same whether or not hyperthreading is enabled. If VCPU A is running on one LCPU while the other LCPU on the same core is halted, then VCPU A charged for using the entire core. This is because all resources at the micro-architectural level are actually devoted to the non-hyperthreaded LCPU. So, if 10 ms are used, VCPU A is charged for using 10 ms.

Keywords

SDK, Virtual Center, ESX

Feedback

Rating: 1 - Lowest 2 3 4 5 - Highest (0 Ratings)   

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (2000 or fewer characters)
Submit
Rating: 1 - Lowest 2 3 4 5 - Highest (0 Ratings)   
Actions