I recently started playing in my homelab with NUMA. My test system runs AMD Ryzen 5900x (6 cores pers CCX, 2x CCX, 2 threads per core) with properly reported NUMA nodes:
New Proxmox (I think 7.3+?) now contains a convenient shortcut to "taskset" to set CPU affinity. Assuming I would like to pin my VM to the 2nd CCX I can simply set the affinity to "6-11". However, this seems like a half of the story. I believe it should be set to "6-11,18-23". However, there's one puzzle-piece missing in my book: how do I properly configure SMP to let the guest OS best utilize the host topology?
In other words, I know I can set "-smp 12,cores=6,threads=2,sockets=1" as extra args and it will cause the VM to see a single 6-core CPU with 12 threads. This will mirror the physical CCX layout. However, it seems like guest scheduler decisions will be disconnected from the host CPU affinity as setting affinity as "6-11,18-23" will essentially mix real cores with HT-cores.
How is such situation usually handled? Should I be messing with guest NUMA in the case of a single CCX being pinned?
Code:
# lscpu
//...
Model name: AMD Ryzen 9 5900X 12-Core Processor
//...
NUMA node0 CPU(s): 0-5,12-17
NUMA node1 CPU(s): 6-11,18-23
New Proxmox (I think 7.3+?) now contains a convenient shortcut to "taskset" to set CPU affinity. Assuming I would like to pin my VM to the 2nd CCX I can simply set the affinity to "6-11". However, this seems like a half of the story. I believe it should be set to "6-11,18-23". However, there's one puzzle-piece missing in my book: how do I properly configure SMP to let the guest OS best utilize the host topology?
In other words, I know I can set "-smp 12,cores=6,threads=2,sockets=1" as extra args and it will cause the VM to see a single 6-core CPU with 12 threads. This will mirror the physical CCX layout. However, it seems like guest scheduler decisions will be disconnected from the host CPU affinity as setting affinity as "6-11,18-23" will essentially mix real cores with HT-cores.
How is such situation usually handled? Should I be messing with guest NUMA in the case of a single CCX being pinned?