Pcornel
Virtualization · VM Hardware › vCPU

Threads

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

Back to the Topic

Answer

Virtual threads describe the guest-visible relationship between logical processors and virtual cores. They are topology information and do not guarantee a direct mapping to host SMT sibling threads.

Remember

  • Virtual thread topology can differ from host SMT topology.
  • Two guest threads in one virtual core are not proof they run on physical SMT siblings.
  • SMT exposure and scheduling policy are platform-dependent.
  • Total guest logical processors remain the primary execution count seen by the guest scheduler.

First checks

  • lscpu | grep Thread — threads per core in guest
  • virsh capabilities | grep -A5 topology — host SMT
  • cat /sys/devices/system/cpu/smt/active — host SMT active

Verify in this order

host SMT → guest threads → scheduler

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.

VM Hardware → vCPU → Threads reference map

BoundaryMeaningEvidence limit
Guest threadLogical processor relationshipTopology presentation
Host SMT threadPhysical logical processorSeparate placement question
CPUID topologyAdvertises hierarchyCan be virtualized
PerformanceWorkload dependentMust be measured

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

Confirmation

Confirm action

Continue?