Pcornel
Virtualization · CPU Virtualization

vCPU Scheduling

Cheat sheet · https://pcornel.dk/topic.php?topic=3477

Back to the Topic

Answer

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.

Remember

  • Fewer vCPUs often run faster.
  • Co-scheduling waits rise with vCPU count.
  • Hyper-threads are not full cores.

First checks

  • virsh schedinfo <vm> — scheduler shares/quota
  • cat /sys/fs/cgroup/machine.slice/*/cpu.stat — cgroup CPU throttling
  • esxtop — %RDY, %CSTP

Verify in this order

vCPU runnable → scheduler → pCPU time

Where it usually breaks

First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3477

Confirmation

Confirm action

Continue?