HanGuangyu, For testing, e.g. to see if your workloads are sensitive to pinning, you should be able to use 'virsh vcpupin ...' to pin vCPUs to pCPUs. To configure pinning in your deployment, the CPU topology docs for Victoria should help: https://docs.openstack.org/nova/victoria/admin/cpu-topologies.html From our experience (and our workloads), pinning to a NUMA node gives the same performance as pinning to individual pCPUs and is therefore good enough. Hope this helps, cheers, Arne On 23.03.22 08:35, 韩光宇 wrote:
Hello,
I have a All-in-One OpenStack Victoria. And I want to bind vCPU of openstack instance(guest) to pCPU of host. # virsh edit instance-00000107 origin: ``` ... <vcpu placement='static'>8</vcpu> <cputune> <shares>8192</shares> </cputune> ... ```
after modify: ``` <vcpu placement='static' cpuset='104-111'>8</vcpu> <cputune> <shares>8192</shares> <vcpupin vcpu='0' cpuset='104'/> <vcpupin vcpu='1' cpuset='105'/> <vcpupin vcpu='2' cpuset='106'/> <vcpupin vcpu='3' cpuset='107'/> <vcpupin vcpu='4' cpuset='108'/> <vcpupin vcpu='5' cpuset='109'/> <vcpupin vcpu='6' cpuset='110'/> <vcpupin vcpu='7' cpuset='111'/> <emulatorpin cpuset='104-111'/> </cputune> ``` But If I stop and start instance by openstack command, xml automatically recover. And If I user `virsh shutdown instance-00000107 && virsh start instance-00000107`, instance can't be start(I don't konw if the openstack instance must be started using openstack command).
So: 1. Can I modify the xml of openstac instance by 'virsh edit'? 2. If I can't modify the xml, how can I bind vcpu of guest and pcpu of host
I would appreciate any kind of guidance or help.
HanGuangyu