Odd number of vCPUs breaks 'prefer' threads policy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Stephen Finucane |
Bug Description
Using a CPU policy of dedicated ('hw:cpu_
http://
When scheduling instance with this extra spec there appears to be an implicit use of the 'prefer' threads policy, i.e. where possible vCPUs are pinned to thread siblings first. This is "implicit" because the threads policy aspect of this spec has not yet been implemented.
However, this implicit 'prefer' policy breaks when a VM with an odd number of vCPUs is booted. This has been seen on a Hyper-Threading
It is reasonable to assume that a three vCPU VM, for example, should try best effort and use siblings for at the first two vCPUs of the VM (assuming you're on a host system with HyperThreading and sibling sets are of length two). This would give us a true best effort implementation.
---
# Testing Configuration
Testing was conducted on a single-node, Fedora 21-based (3.17.8-
openstack flavor create --ram 4096 --disk 20 --vcpus 3 demo.odd
nova flavor-key demo.odd set hw:cpu_
openstack flavor create --ram 4096 --disk 20 --vcpus 4 demo.even
nova flavor-key demo.even set hw:cpu_
# Results
Correct case ("even" number of vCPUs)
=======
The output from 'virsh dumpxml [ID]' for the four vCPU VM is given below. Similar results can be seen for varying "even" numbers of vCPUs (2, 4, 10 tested):
<cputune>
<vcpupin vcpu='0' cpuset='3'/>
<vcpupin vcpu='1' cpuset='23'/>
<vcpupin vcpu='2' cpuset='26'/>
<vcpupin vcpu='3' cpuset='6'/>
</cputune>
Incorrect case ("odd" number of vCPUs)
=======
The output from 'virsh dumpxml [ID]' for the three vCPU VM is given below. Similar results can be seen for varying "odd" numbers of vCPUs (3, 5 tested):
<cputune>
<vcpupin vcpu='0' cpuset='1'/>
<vcpupin vcpu='1' cpuset='0'/>
<vcpupin vcpu='2' cpuset='25'/>
</cputune>
This isn't correct. We would expect something closer to this:
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='20'/>
<vcpupin vcpu='2' cpuset='1'/>
</cputune>
Changed in nova: | |
assignee: | nobody → Stephen Finucane (sfinucan) |
Changed in nova: | |
assignee: | Stephen Finucane (sfinucan) → Nikola Đipanov (ndipanov) |
status: | Invalid → In Progress |
Changed in nova: | |
assignee: | Nikola Đipanov (ndipanov) → Stephen Finucane (sfinucan) |
Changed in nova: | |
assignee: | Stephen Finucane (sfinucan) → Nikola Đipanov (ndipanov) |
Changed in nova: | |
assignee: | Nikola Đipanov (ndipanov) → Stephen Finucane (sfinucan) |
@Stephen Finucane (sfinucan):
Since you are set as assignee, I switch the status to "In Progress".