A vCPU stands for virtual Central Processing Unit and represents the central processing unit used in virtual machines and cloud environments. Each vCPU in a VM's operating system represents a virtual processor that the hypervisor schedules on a physical CPU core or thread.
Businesses use VMs to save rack space and time and to reduce management costs. VMs allow users to run multiple OSes on a single physical machine, while vCPUs ensure the necessary performance.
In this article, you will learn what a vCPU is, how it compares to a CPU, and how to calculate vCPU requirements.

What Is a vCPU?
A virtual CPU is a slice of a physical processor that a hypervisor hands to a virtual machine. Each vCPU represents one thread of work the VM can run at a time. The hypervisor schedules those threads onto real CPU cores, timeโsharing them so that many VMs can run on the same hardware without interfering with each other.
In practice, one vCPU usually maps to one logical core (the threads your server's CPU presents via hyperโthreading). On processors without hyperโthreading, that mapping is one vCPU per physical core. Modern hypervisors do not lock a vCPU to a single core, but juggle threads across all available cores to maximize utilization. It is even possible to oversubscribe and give out more vCPUs than there are real cores if you know that not all VMs will peak at the same time.
vCPUs are highly scalable because they are just shares of real CPU time rather than separate chips. Users can increase or decrease vCPU counts on demand in cloud and virtualization platforms, thereby matching performance needs without changing physical hardware. This flexibility is a key reason why virtualized and cloud environments can expand or shrink so quickly under load.
Note: Refer to our comprehensive guide to learn the difference between a CPU and GPU.
vCPU vs Physical CPU
A physical CPU is a tangible chip installed on the computer's motherboard. It contains one or more cores, where each core executes one or more threads in hardware. A physical CPU fits into a socket and has a specific core count, clock speed, and cache size.
On the contrary, a vCPU is a software construct that represents a single thread of processing power that the hypervisor assigns to a virtual machine. The hypervisor manages all vCPUs in the system and decides when each one can run on a physical core. Instead of permanently linking a vCPU to one core, the hypervisor rotates them in and out, running each vCPU on any available core for short periods. This allows multiple VMs to share the same physical hardware efficiently.
Since vCPUs share physical cores, their raw performance lags behind a sameโspeed physical core. Users can oversubscribe (assign more vCPUs than available cores) if not all VMs will peak simultaneously. Physical CPUs shine in consistently heavy workloads while vCPUs excel in flexible, onโdemand cloud and virtualization scenarios.
The table below provides a key overview of the differences between the two:
Aspect | Physical CPU | vCPU |
---|---|---|
Hardware | Actual silicon core(s). | Softwareโdefined scheduling on real cores. |
Performance | Dedicated core time. | Contention and timeโslicing by the hypervisor. |
Scalability | Fixed by hardware specs. | Dynamically assignable and oversubscribable. |
Isolation | Full core pipeline and cache. | Shared caches, pipelines, and memory bandwidth. |
How Many vCPUs Are in a CPU?
Modern CPUs are built using integrated circuit microprocessors that contain one or more cores (such as dual or quad-core CPUs). Chips with more than one core are known as multi-core processors. Each core can handle multiple threads using simultaneous multithreading (SMT).
Intel refers to SMT as Hyper-Threading, while AMD uses its own SMT implementation. These threads are presented as logical cores, which the hypervisor uses to assign virtual CPUs to virtual machines.
A single physical core typically supports two threads, meaning it exposes two logical cores to the operating system. While Hyper-Threading and SMT do not double performance, they improve CPU efficiency and allow users to schedule more concurrent VM workloads, especially under mixed or unpredictable loads.
Taking all the above into consideration, the number of vCPUs available on a host machine depends on the following factors:
- The number of physical CPUs (sockets) on the host system. Most servers have one or two sockets, though high-end systems can support more.
- The number of cores per CPU. Each core is capable of independently executing instructions and handling tasks. Modern CPUs offer anywhere from a few cores to as many as 64 per socket.
- The number of threads per core. This is typically two, made possible through SMT/Hyper-Threading.
Hypervisors manage vCPU scheduling by distributing workloads across these logical cores. In most environments, vCPUs can be overcommitted, which means more vCPUs can be assigned than there are logical cores.
Note: Read our article on the Linux perf command and learn to monitor CPU performance.
How Does a vCPU Work?
When a VM needs to run something, it issues work to its vCPU. The hypervisor's CPU scheduler maintains a queue of all ready vCPUs and selects one to run on any available hardware thread (logical core). Each vCPU chops its execution into tiny time slots and shares whichever physical core is free at that moment.
Although the scheduler can utilize idle execution units in any core, it does not mean that a vCPU is "faster" than a physical core. A vCPU simply maximizes utilization when workloads fluctuate. When many vCPUs are queued and demand outstrips supply, you may see higher latency or CPU steal time, which is the time the VM spends waiting for its turn.
The key points of vCPU scheduling are:
- The hypervisor clusters all vCPUs in a ready queue rather than binding each one permanently to a single core.
- At each scheduling quantum, it assigns the next vCPU to any idle logical core.
- Overcommitment lets you allocate more vCPUs than there are logical cores. Otherwise, all VMs will peak simultaneously.
Such a flexible timeโsharing model allows you to run many VMs on a host with only a handful of physical cores, while still giving each VM the illusion of having its own CPU.
How to Calculate vCPUs
Calculating how many vCPUs you can assign depends on two main perspectives:
- How many your hardware can support (vCPU capacity).
- How many you should assign to a virtual machine (vCPU sizing).
This section focuses on estimating how many vCPUs your physical CPU(s) can support before oversubscription, followed by factors that influence performance and key considerations.
Formula to Estimate vCPU Requirements
There is no one-size-fits-all rule for determining the exact number of vCPUs a system can support. The optimal number of vCPUs per VM depends on factors like the hypervisor, guest OS limits, licensing, and workload type.
However, to estimate the maximum number of vCPUs a host system can provide, use this general formula:
Logical processors (vCPU capacity) = Sockets ร Cores per socket ร Threads per core
Each logical processor corresponds to a single hardware thread. Since each vCPU maps to one hardware thread under most hypervisors, this gives you the baseline number of vCPUs available without oversubscription.
Example Calculation Scenario
This section shows a real-world example to estimate the vCPU capacity of a system using CPU information available on both Windows and Linux.
Follow the steps below to find the number of cores and threads and calculate the vCPU estimation:
Windows users
1. Open Task Manager by pressing Ctrl+Shift+Esc.
2. Click the Performance tab and select the CPU section.
3. On the right side, find the number of Cores, Logical Processors (Threads), and Sockets (CPU count). The example above tells us the CPU uses 2 threads per core (i.e., simultaneous multithreading is enabled).
The maximum vCPU number for this machine is:
1 ร 4 ร 2 = 8 vCPUs
The formula above shows that this system can safely support up to 8 vCPUs without oversubscription, which is one vCPU per logical processor.
Linux users
1. Open a terminal window (Ctrl+Alt+T).
2. Run the lscpu command:
lscpu
The command output states the CPU details, including the number of physical CPUs, cores, and threads per core. In the example above, we see that Hyper-Threading is disabled, meaning each core has only one thread.
The maximum vCPU number for this machine is:
1 ร 4 ร 1 = 4 vCPUs
In this configuration, the system only supports 4 vCPUs, as there are only 4 logical processors available.
Factors Affecting vCPU Performance
While the formula provides a physical limit, real-world performance depends on many additional variables. The following factors can influence how well vCPUs behave once assigned:
- Clock speed vs. CPU architecture. Higher clock speed does not always equal better performance. Take into consideration instructions per cycle (IPC) as well.
- Oversubscription levels. More vCPUs than physical threads can lead to scheduling delays and increased CPU wait time.
- NUMA node boundaries. Poor placement across Non-Uniform Memory Access (NUMA) nodes can introduce latency if vCPUs and memory are not local.
- Hypervisor scheduling behavior. VMware, KVM, and HyperโV all have different algorithms for assigning vCPUs to physical threads.
- Application workload. CPU-bound workloads (e.g., video rendering, analytics) need dedicated vCPUs, while I/O-bound or lightweight tasks (e.g., DNS servers) tolerate higher vCPU density.
By understanding these variables, you can fine-tune your environment and make better decisions when assigning or scaling vCPUs.
vCPU Calculation Important Considerations
Although the formula provides a solid starting point, it is important to understand that vCPU planning is not one-size-fits-all. Consider the following when making real-world decisions:
- Start with a 1:1 ratio. One vCPU per physical core is a safe baseline, especially for specific performance-sensitive workloads. One vCPU per thread is safe for most workloads.
- Monitor performance metrics. Watch CPU ready time, steal time, and utilization inside the guest to identify contention.
- Know your limits. Guest operating systems, hypervisors, and licenses often cap the number of supported vCPUs per VM.
- Understand licensing impact. Some software vendors charge per vCPU, which means overprovisioning can inflate costs unnecessarily.
- Be workload-aware. Do not assign vCPUs just because you can. Profile your applications and scale as needed.
- Reserve for the host OS. Leave enough cores for the hypervisor or host system to manage workloads and background tasks.
In summary, the number of CPU threads equals the number of vCPUs you can safely assign. Beyond that, everything depends on your performance goals, application type, and system behavior under load.
How Many vCPUs Do You Need?
There is no fixed rule for how many vCPUs to assign to a virtual machine. Your decision should be based on the workload type, performance expectations, and the underlying hardware's capacity. Assigning too few vCPUs can cause bottlenecks, while assigning too many can lead to wasted resources or contention with other VMs.
Below are some general guidelines to help determine the right number of vCPUs:
- Start small. Begin with 1 or 2 vCPUs for light workloads (DNS, file servers, dev/test environments).
- Scale based on performance. Monitor CPU usage and scale up if the VM consistently hits high CPU utilization or shows high "CPU ready" or "steal" times.
- Use baseline requirements. For apps like databases, mail servers, or web servers, follow the vendor's recommended minimums, but avoid blindly assigning the maximum without testing first.
- Avoid assigning all cores. Do not give a VM the same number of vCPUs as total physical cores unless it is a highly specialized workload. Leave room for the hypervisor and other VMs.
- Use benchmarking and testing. When in doubt, simulate your expected workload using test environments and performance monitoring tools before committing to a specific vCPU count.
Best Practices for vCPU Allocation
Proper vCPU allocation ensures you get the best performance and efficiency from your virtual infrastructure. Poorly sized VMs can cause performance degradation, excessive CPU contention, or underutilized hardware.
Follow these best practices when assigning vCPUs:
- Start with a 1:1 vCPU-to-thread ratio and monitor performance before scaling up.
- Right-size based on workload, not based on hardware capacity.
- Avoid excessive oversubscription in CPU-intensive environments. Stay below a 2:1 vCPU-to-thread ratio when possible.
- Leave CPU resources for the hypervisor (especially in smaller environments). Do not fully consume all logical processors with VM assignments.
- Use CPU reservations or limits for critical VMs that must always have access to CPU resources.
- Distribute large VMs evenly across NUMA nodes, especially on systems with more than one CPU socket.
- Monitor continuously using metrics like CPU ready time, steal time, and guest CPU utilization to adjust vCPU counts over time.
A balanced, data-driven approach to vCPU allocation will help ensure optimal performance while maintaining scalability and flexibility in your virtual environment.
Conclusion
This article explained the concept of a virtual CPU, how it works, and where it is used. You also learned how to calculate the maximum number of vCPUs for a single machine or a particular workload.
Learn more about the software in our Virtualbox vs. VMware comparison article, or learn about server virtualization and how it works.