CPU Topology
Cheat sheet · https://pcornel.dk/topic.php?topic=3451
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 mapnumactl -H— guest NUMA layoutvirsh 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
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Sockets | Package grouping | Guest-visible |
| Cores | Core grouping | Guest-visible |
| Threads | Logical processors per core | May be synthetic |
| Physical topology | Host packages/cores/SMT/NUMA | Must 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