What is a vCPU?
A vCPU (virtual CPU) is the unit of compute capacity a cloud instance is sold in, usually one hardware thread on a physical processor core.
Why it matters
On most cloud instances, each vCPU is one thread running on a physical CPU core. Where a processor supports simultaneous multithreading, one core runs two threads. Instance sizes are set mainly by their vCPU count and memory, and some services are billed per vCPU-hour.
Billing data shows vCPUs and memory but no processor utilisation. That makes the vCPU count one of the main signals for estimating a workload's energy use and hardware footprint. An instance with more vCPUs takes a bigger share of its server's electricity and manufacturing emissions.
An example
AWS uses the m5.xlarge as an example. By default it has two CPU cores and two threads per core, so four vCPUs in total. Customers can turn multithreading off for some workloads, such as high performance computing. For most instance types the price stays the same either way.
How Greenpixie measures it
Greenpixie works out electricity and embodied emissions per vCPU from the physical server:
- published server power measurements, with memory and drives removed, divided by the server's hardware thread count
- a fixed operating point for standard instances, or the provider's baseline allowance for burstable ones
- the server's hourly embodied emissions, with the processor share divided by its thread count
- a per-vCPU rate for container and function services billed per vCPU
Each instance takes its vCPU count at those rates for the hours it is billed, plus its share of the host's memory, storage and any accelerators.