Use it for VM CPU sizing and when separating guest CPU count from host CPU capacity, scheduler contention or topology.
vCPU
A vCPU is what the guest schedules work onto, but the hypervisor ultimately schedules that vCPU onto physical cores/threads. vCPU count therefore describes guest-visible parallel execution capacity, not dedicated pCPU ownership.
1. Right-size vCPUs from measured demand.
2. Prefer cores over sockets unless licensing needs otherwise.
3. Stay within a NUMA node where possible.
4. CPU type affects migration.
5. Watch ready/steal.
vCPU config → topology → scheduler → physical cores
Correlate hypervisor scheduler metrics and workload performance under representative load.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
It does not show CPU headroom, low scheduler wait, correct NUMA locality or linear workload scaling.
Next check: Correlate hypervisor scheduler metrics and workload performance under representative load.
vCPU execution depends on guest runnable state, hypervisor scheduling, physical CPU availability, NUMA locality and contention/steal or ready time. and state what the evidence does not show.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
configured vCPU → virtual topology/features → hypervisor scheduler → physical execution → guest scheduler → workload
Step 2 Branching troubleshooting Narrow the fault
Concrete boundaries: guest thread → vCPU runnable → hypervisor scheduler → pCPU/NUMA placement → execution/steal-ready time → guest completion → workload latency.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
Virtual sockets are a guest-visible grouping of virtual processors that models processor packages in the VM CPU topology.
Subtopic CoresVirtual cores are guest-visible processor cores within the virtual CPU topology and contribute to the VM total logical processor count.
Subtopic ThreadsVirtual CPU threads expose simultaneous-multithreading-style logical processor topology within a virtual core when the platform supports such topology presentation.
Subtopic CPU TopologyCPU Topology is the guest-visible arrangement of virtual sockets, cores and threads that describes how the VM logical processors are grouped.
Subtopic CPU TypeCPU Type is the virtual processor model or compatibility profile the hypervisor exposes to a VM.
Subtopic CPU FlagsCPU Flags are individual processor feature bits or capabilities exposed to or hidden from the guest through the virtual CPU model.
Subtopic CPU Hot AddCPU Hot Add is the ability to increase a VM's virtual processor count while it is running, subject to hypervisor and guest operating-system support.
- vCPU count is guest-visible logical CPU capacity.
- A vCPU is not automatically pinned to one physical core.
- More vCPUs can increase parallelism but can also increase scheduling coordination and NUMA/topology effects.
- CPU utilization inside the guest and hypervisor scheduler wait are different measurements.
virsh vcpucount <vm>— vCPU countqm config <vmid> | grep -E 'sockets|cores|cpu:'— Proxmox CPU settingsGet-VMProcessor <vm>— Hyper-V vCPU
ReferenceWhy it matters1 section · depth on demand
How it works in operation
vCPU — operational mechanics and state ownership. vCPU execution depends on guest runnable state, hypervisor scheduling, physical CPU availability, NUMA locality and contention/steal or ready time.
ReferenceImportant terms & boundaries3 sections · depth on demand
What this shows and what it does not
Guest-visible vCPU count shows CPU presentation, not scheduler latency, physical exclusivity or workload scaling.
Deeper scheduler, ready/wait, affinity, pinning and compatibility behavior belongs to CPU Virtualization.
vCPU execution depends on guest runnable state, hypervisor scheduling, physical CPU availability, NUMA locality and contention/steal or ready time. and state what the evidence does not show.
Platform, version and operating-envelope scope
Hypervisor metrics and CPU scheduling names differ across KVM/Proxmox, Hyper-V and VMware releases. Concrete boundaries: guest thread → vCPU runnable → hypervisor scheduler → pCPU/NUMA placement → execution/steal-ready time → guest completion → workload latency.
In depth
As VM hardware, the vCPU count and topology (sockets × cores × threads) are what the guest OS sees. The topology affects licensing (some software licenses per socket) and NUMA behaviour, and the count should match what the workload actually uses.
| Sizing practice | Reason |
|---|---|
| Start small (2 vCPUs) and grow on evidence | Oversized VMs schedule worse |
| Match cores per socket to NUMA layout | Better guest scheduling |
| Avoid single-vCPU for modern OSes with services | Can stall under load |
| Check guest CPU and host ready/steal | Separate guest saturation from host contention |
Set-VMProcessor -VMName app01 -Count 4
Get-VMProcessor -VMName app01 | Select-Object Count, CompatibilityForMigrationEnabled
qm set 101 --sockets 1 --cores 4
nproc; lscpu | grep -E 'Socket|Core|Thread'
If the guest shows high CPU but host ready time is low, the VM needs more vCPUs; if ready time is high, the host is contended and more vCPUs will make it worse.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in VM Hardware → vCPU. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
VM Hardware → vCPU reference map
Fast VM-hardware boundaries for VM Hardware → vCPU.
| Boundary | Meaning | Evidence limit |
|---|---|---|
| vCPU count | Logical processors exposed to guest | Not dedicated physical cores |
| Scheduler | Maps runnable vCPUs to pCPUs | Can introduce wait/contention |
| Guest CPU % | Guest view of execution demand | Not host scheduler wait |
| Physical CPU | Finite execution backing | Shared unless isolated/pinned |