Browse Definitions :

virtual CPU (vCPU)

What is a virtual CPU (vCPU)?

A virtual CPU (vCPU) is the processor of a virtual machine (VM). Each vCPU represents the ability to run one processing thread at a time. The VM hypervisor manages the scheduling of the vCPU time to the physical CPU.

How do virtual CPUs work?

Computers need three major resources to function: storage (disk space), memory (RAM) and compute (CPU). In a VM, the hypervisor manages the guest virtual machines (guest VMs) and tells or assigns them how much virtual resources they have access to. The hypervisor then schedules the demand from the guest VM to the physical hardware.

Diagram illustrating how VMs work.
Multiple VMs, each running its own applications and guest OS, can share the same hypervisor, host OS and underlying host hardware (storage, memory and compute).

Each vCPU represents the ability to run one processor thread on a system's physical CPU simultaneously. So, for every vCPU, there's a processor thread running for each on the physical CPU. For example, if a VM is assigned four vCPUs, the operating system (OS) would expect that it can run four threads at a time. The hypervisor will then be responsible for scheduling the incoming threads from the guest VM to the physical CPU for execution.

Modern virtualized systems do not permanently assign one single vCPU to a single physical CPU. Instead, they take the incoming threads from the VMs and assign them as needed in a time sharing fashion to the physical CPU cores as they are available. This allows for better utilization of the CPU resources.

Complicating matters, most modern server CPUs can run two threads per CPU core using simultaneous multithreading or hyperthreading. Each vCPU represents about half of a physical core of processing ability or one CPU thread.

VCPU oversubscription

Assigning more vCPUs than available physical cores is called oversubscription. A moderate amount of oversubscribing is usually acceptable because most VMs rarely use all their available CPU. Instead, they often sit mostly idle for long stretches of time and then use a lot of resources for a short burst of activity.

If many vCPUs are used at the same time in an oversubscribed system, there may be resource contention, and performance will suffer. To limit the possibility of this, it is best to plan out how many vCPUs are used by taking into account the total physical CPUs and the expected workload. For example, an end-user client VM will have erratic performance ups and downs depending on the user activity, while a server will be more predictable. Some VMs may always run at high CPU utilization and should not be oversubscribed.

Cloud providers may or may not oversubscribe vCPUs depending on the VM type, cost and terms of service. For instance, most high-end AWS tiers dedicate one vCPU per physical CPU thread. Some smaller AWS T2 instances are instead classified as Burstable Performance Instances, which are limited to not using an entire physical CPU core all the time.

For dedicated VM hypervisors, admins can set rules to determine how they will handle resource contention. For instance, VMware ESXi will assign all VMs equal priority by default. If administrators want to make sure one VM always has a certain amount of capacity, they can set a reservation to dedicate a certain amount of the physical CPU power to it. A share can also be specified to give one VM higher or lower priority than others in the case of resource constraints.

VMware ESXi hypervisor management screenshot.
Management of ESXi showing CPU, memory and storage stats with a host of other settings.

How many vCPUs are in a CPU?

Generally, it can be said that there is one vCPU at a time per physical CPU thread. Most physical server CPUs have two threads per core, so two vCPUs per CPU core. To calculate the number of vCPUs for Intel Xeon and AMD processors, take the number of physical CPU cores and multiply by two.

Diagram of architecture of multicore processors.
Multicore processors have multiple processing units (cores) incorporated in them. Multiply each core by two to determine the number of vCPUs that are available.

For CPUs without multithreading, such as with Arm processors, it is one vCPU per physical CPU core.

Practically, admins can assign as many vCPUs per physical CPU core as utilization will allow.

Learn how to choose the best CPU for virtualization and check out our ultimate guide to server virtualization.

This was last updated in September 2023

Continue Reading About virtual CPU (vCPU)

  • SD-WAN security

    SD-WAN security refers to the practices, protocols and technologies protecting data and resources transmitted across ...

  • net neutrality

    Net neutrality is the concept of an open, equal internet for everyone, regardless of content consumed or the device, application ...

  • network scanning

    Network scanning is a procedure for identifying active devices on a network by employing a feature or features in the network ...

  • virtual firewall

    A virtual firewall is a firewall device or service that provides network traffic filtering and monitoring for virtual machines (...

  • cloud penetration testing

    Cloud penetration testing is a tactic an organization uses to assess its cloud security effectiveness by attempting to evade its ...

  • cloud workload protection platform (CWPP)

    A cloud workload protection platform (CWPP) is a security tool designed to protect workloads that run on premises, in the cloud ...

  • Regulation SCI (Regulation Systems Compliance and Integrity)

    Regulation SCI (Regulation Systems Compliance and Integrity) is a set of rules adopted by the U.S. Securities and Exchange ...

  • strategic management

    Strategic management is the ongoing planning, monitoring, analysis and assessment of all necessities an organization needs to ...

  • IT budget

    IT budget is the amount of money spent on an organization's information technology systems and services. It includes compensation...

  • ADP Mobile Solutions

    ADP Mobile Solutions is a self-service mobile app that enables employees to access work records such as pay, schedules, timecards...

  • director of employee engagement

    Director of employee engagement is one of the job titles for a human resources (HR) manager who is responsible for an ...

  • digital HR

    Digital HR is the digital transformation of HR services and processes through the use of social, mobile, analytics and cloud (...

Customer Experience
  • chatbot

    A chatbot is a software or computer program that simulates human conversation or "chatter" through text or voice interactions.

  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.