What Is a vCPU
How a vCPU Maps to Physical Processors
A vCPU, or virtual CPU, is a processor that a hypervisor presents to a virtual machine as if it were a real core. Behind the scenes, a vCPU is a thread that the hypervisor schedules onto a physical core or hardware thread whenever it has work to do.
A virtual machine with four vCPUs does not own four physical cores. The hypervisor runs each vCPU when a physical processor is free, so many virtual machines' vCPUs can share the same physical cores over a short time. Modern processors can also run two threads per core, a feature Intel calls Hyper-Threading. One physical core then appears as two logical processors, and a vCPU mapped to one of them shares that core with the other thread.
Why a vCPU Is Not the Same as a Dedicated Core
A vCPU is a scheduling slot, not a guaranteed piece of silicon. Its speed depends on the physical processor it runs on, how busy that processor is, and whether its core is shared with another busy thread. Two servers that both list four vCPUs can therefore deliver very different performance. When the host is crowded, the gap shows up as CPU steal time. A host that sells more vCPUs than it has cores, a practice known as overselling, will show this gap more often.
Specifications also vary across providers. One provider's vCPU may be a hardware thread, another's a full core, and the processor generations behind each can differ. Comparing vCPU counts alone can be misleading, so use benchmarks or the provider's description of how CPU is allocated. The difference between shared and reserved allocation is covered in the article on dedicated vs shared vCPUs.
The number you need depends on the software. A single-threaded application may gain more from a fast core than from extra vCPUs, while a build server or a program that runs many parallel tasks benefits from more of them.
Frequently asked questions
Is one vCPU the same as one physical CPU core?
No. A vCPU is a virtual scheduling unit. It maps to a physical core or hardware thread, and that processor may be shared with other virtual machines and host processes. Performance depends on what else is running on the same processor at the same time.
How many vCPUs does a website need?
It depends on the software, the traffic and how much work each request involves. Many small websites run comfortably on one or two vCPUs. Heavier applications, such as database servers or sites that process images or video, may need more. Measure resource use over time before you increase the count.