How to verify that vcpupinning works correctly and why do virsh vcpuinfo and taskset show different information in Red Hat OpenStack Platform?
Issue
How to verify that vcpupinning works correctly and why do virsh vcpuingo and taskset show different information?
taskset
and vcpupin
/ vcpuinfo
show different results in a lab. Which command shows the correct output?
[root@overcloud-compute-0 ~]# virsh list | awk '{print $2}' | xargs -I {} bash -c "echo {}; virsh vcpupin {}" 2>/dev/null
instance-00000060
VCPU: CPU Affinity
----------------------------------
0: 3-11
instance-00000066
VCPU: CPU Affinity
----------------------------------
0: 0
1: 1
2: 2
instance-0000006c
VCPU: CPU Affinity
----------------------------------
0: 3-11
1: 3-11
2: 3-11
3: 3-11
[root@overcloud-compute-0 ~]# virsh list | awk '{print $2}' | xargs -I {} bash -c "echo {}; virsh vcpuinfo {}" 2>/dev/null
Name
instance-00000060
VCPU: 0
CPU: 3
State: running
CPU time: 1.7s
CPU Affinity: ---yyyyyyyyy
instance-00000066
VCPU: 0
CPU: 0
State: running
CPU time: 1.6s
CPU Affinity: y-----------
VCPU: 1
CPU: 1
State: running
CPU time: 0.4s
CPU Affinity: -y----------
VCPU: 2
CPU: 2
State: running
CPU time: 0.2s
CPU Affinity: --y---------
instance-0000006c
VCPU: 0
CPU: 3
State: running
CPU time: 1.5s
CPU Affinity: ---yyyyyyyyy
VCPU: 1
CPU: 4
State: running
CPU time: 0.8s
CPU Affinity: ---yyyyyyyyy
VCPU: 2
CPU: 5
State: running
CPU time: 0.1s
CPU Affinity: ---yyyyyyyyy
VCPU: 3
CPU: 6
State: running
CPU time: 0.1s
CPU Affinity: ---yyyyyyyyy
VCPU: 4
CPU: 7
State: running
CPU time: 0.2s
CPU Affinity: ---yyyyyyyyy
[root@overcloud-compute-0 ~]# for i in `pgrep qemu-kvm` ; do taskset -p $i ; done
pid 31883's current affinity mask: ff0
pid 32074's current affinity mask: ff0
pid 32246's current affinity mask: ff0
Environment
Red Hat Enterprise Linux OpenStack Platform 7.0
Red Hat OpenStack Platform 8.0
Red Hat OpenStack Platform 9.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.