[Question]How to set CPU topology (to expose SMT to guest) and pin individual core?

lilunxm12

New Member
Oct 5, 2023
2
0
1
In KVM, the xml could be edit to include
XML:
<cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='8'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='9'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='10'/>
    <vcpupin vcpu='6' cpuset='5'/>
    <vcpupin vcpu='7' cpuset='11'/>
</cputune>
<cpu mode='host-passthrough'>
    <topology sockets='1' cores='4' threads='2'/>
</cpu>
Is that possible for proxmox ve?
 
I am not quite sure if this is the full answer to your question, but maybe have a look at this thread https://forum.proxmox.com/threads/cpu-pinning-to-ct-possible.84476/ If not could you explain a bit more what exactly you want to achieve ?

Thanks for reply

What I'm trying to accomplish is

1. let my VM know that it has 6 cores and 12 threads, not 12 real cores
2. prevent the host from shuffling threads between cores, unless the VM OS scheduler asks

the link is for containers not VM, so unfortunately won't work for me