Pcornel
Virtualization · VM Hardware › vCPU

CPU Topology

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

Back to the Topic

Answer

VM CPU topology combines total vCPU count with hierarchy information. It influences guest scheduling, NUMA presentation, licensing and some application behavior, while remaining distinct from physical host topology.

Remember

  • Topology has both count and hierarchy.
  • Guest topology can be synthetic and need not mirror the host.
  • Large VMs should be evaluated with NUMA locality in mind.
  • Topology changes can affect software behavior even when CPU capacity is unchanged.

First checks

  • lscpu -e — guest CPU, core, socket, node map
  • numactl -H — guest NUMA layout
  • virsh capabilities — host topology

Verify in this order

config → virtual topology → guest 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 → CPU Topology reference map

BoundaryMeaningEvidence limit
SocketsPackage groupingGuest-visible
CoresCore groupingGuest-visible
ThreadsLogical processors per coreMay be synthetic
Physical topologyHost packages/cores/SMT/NUMAMust be observed separately

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

Confirmation

Confirm action

Continue?