Use this to understand why multi-vCPU VMs wait for cores and how vCPU count affects scheduling.
vCPU Scheduling
vCPU scheduling is how the hypervisor places virtual CPUs onto physical cores over time. Fewer, right-sized vCPUs schedule more easily; oversized multi-vCPU VMs wait longer for free cores and show higher ready time.
1. The hypervisor scheduler time-slices vCPUs.
2. Shares/weights set priority under contention.
3. Limits/quotas cap usage.
4. Co-stop affects many-vCPU VMs.
5. Measure ready and throttling.
vCPU runnable → scheduler → pCPU time
Context & applicabilityCommon mistakes · platform/version boundaries
- Giving every VM many vCPUs "just in case", raising scheduling latency for all VMs.
- More vCPUs than physical cores in one NUMA node without vNUMA.
- Licensing costs tied to vCPU count ignored.
- Not checking CPU ready/steal before adding vCPUs.
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.
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.
- Fewer vCPUs often run faster.
- Co-scheduling waits rise with vCPU count.
- Hyper-threads are not full cores.
virsh schedinfo <vm>— scheduler shares/quotacat /sys/fs/cgroup/machine.slice/*/cpu.stat— cgroup CPU throttlingesxtop— %RDY, %CSTP
ReferenceWhy it matters1 section · depth on demand
Right-sizing vCPUs
- Start small (2 vCPUs) and add only if the guest is CPU-bound.
- Large VMs need several cores free at once (co-scheduling), so they can wait longer than small VMs.
- Keep a VM within one NUMA node when possible (vCPUs ≤ cores per socket).
- Hyper-threads are not full cores; plan on physical cores for latency-sensitive VMs.
Watch CPU ready / steal time and co-stop rather than just CPU usage.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
The hypervisor scheduler decides which vCPU runs on which core and when. Modern schedulers use relaxed co-scheduling: vCPUs of one VM may run independently, but if their progress drifts too far the scheduler stops the leading ones (co-stop). Large VMs therefore suffer more on busy hosts.
Scheduler-related tuning: right-size vCPU counts, keep VMs within one NUMA node, avoid CPU limits unless needed, and use latency-sensitivity settings (VMware) or pinning (KVM) only for workloads that truly need it.
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 CPU Virtualization → vCPU Scheduling. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/docs.html · confidence 94%