Bug 1277736 - [RFE][nova]: Virt driver pinning guest vCPUs threads to host pCPUs threads
[RFE][nova]: Virt driver pinning guest vCPUs threads to host pCPUs threads
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
high Severity low
: ga
: 9.0 (Mitaka)
Assigned To: Eoghan Glynn
Prasanth Anbalagan
https://blueprints.launchpad.net/nova...
upstream_milestone_mitaka-3 upstream_...
: FutureFeature, TestOnly, Triaged, ZStream
: 1305568 (view as bug list)
Depends On: 1333195 1333457
Blocks: 1292592 1304381 1305568 1309775 1342856
  Show dependency treegraph
 
Reported: 2015-11-03 18:15 EST by Stephen Gordon
Modified: 2016-09-30 09:11 EDT (History)
17 users (show)

See Also:
Fixed In Version: openstack-nova-13.0.0-1.el7ost
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1304381 (view as bug list)
Environment:
Last Closed: 2016-08-24 08:51:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1550317 None None None 2016-06-08 12:05 EDT
OpenStack gerrit 202647 None None None Never
OpenStack gerrit 202648 None None None Never
OpenStack gerrit 202649 None None None Never
OpenStack gerrit 202650 None None None Never
OpenStack gerrit 202651 None None None Never
OpenStack gerrit 202652 None None None Never
OpenStack gerrit 202653 None None None Never
OpenStack gerrit 202654 None None None Never
OpenStack gerrit 202655 None None None Never
OpenStack gerrit 285232 None None None 2016-06-08 12:06 EDT
OpenStack gerrit 326944 None None None 2016-06-08 12:06 EDT

  None (edit)
Description Stephen Gordon 2015-11-03 18:15:55 EST
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/virt-driver-cpu-thread-pinning.

Description:

This feature aims to implement the remaining functionality of the 'virt-driver-cpu-pinning' story. This "remaining functionality" entails adding support for thread policies

Specification URL (additional information):

http://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/virt-driver-cpu-pinning.html
Comment 2 Stephen Gordon 2016-02-11 03:29:37 EST
*** Bug 1305568 has been marked as a duplicate of this bug. ***
Comment 3 Mike McCune 2016-03-28 18:33:16 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 4 Stephen Gordon 2016-06-08 12:05:35 EDT
Sahid do we also need to pick up:

https://review.openstack.org/326944
https://review.openstack.org/285232
Comment 5 Sahid Ferdjaoui 2016-06-09 07:16:39 EDT
(In reply to Stephen Gordon from comment #4)
> Sahid do we also need to pick up:
>
> https://review.openstack.org/326944
> https://review.openstack.org/285232

We are going to get the first one for free since it will be backported to stable/mitaka. The second one is a nice to have in case users request NUMA things without to have activated the NUMATopologyFilter.

I'll try to follow both patches to make sure we will have them for GA.
Comment 10 Prasanth Anbalagan 2016-08-18 11:00:43 EDT
Verified as follows - Instances are created successfully (pinned to VCPUS) with no overlap between instances even when they are on same host.

***********
VERSION
***********

[root@serverX]# yum list installed | grep openstack-nova
openstack-nova-api.noarch            1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-cert.noarch           1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-common.noarch         1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-compute.noarch        1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-conductor.noarch      1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-console.noarch        1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-novncproxy.noarch     1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
openstack-nova-scheduler.noarch      1:13.1.1-2.el7ost       @rhelosp-9.0-puddle
[root@serverX]# 

******
LOGS
******

[root@serverX]# nova flavor-show tempest-test_flavor_prefer_-795153569
+----------------------------+--------------------------------------------------------------------------------------------------------------------+
| Property                   | Value                                                                                                              |
+----------------------------+--------------------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                                                                                              |
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                  |
| disk                       | 5                                                                                                                  |
| extra_specs                | {"aggregate_instance_extra_specs:pinned": "true", "hw:cpu_policy": "dedicated", "hw:cpu_threads_policy": "prefer"} |
| id                         | 1662977424                                                                                                         |
| name                       | tempest-test_flavor_prefer_-795153569                                                                              |
| os-flavor-access:is_public | True                                                                                                               |
| ram                        | 512                                                                                                                |
| rxtx_factor                | 1.0                                                                                                                |
| swap                       |                                                                                                                    |
| vcpus                      | 2                                                                                                                  |
+----------------------------+--------------------------------------------------------------------------------------------------------------------+

[root@serverX]# nova flavor-show 200
+----------------------------+--------------------------------+
| Property                   | Value                          |
+----------------------------+--------------------------------+
| OS-FLV-DISABLED:disabled   | False                          |
| OS-FLV-EXT-DATA:ephemeral  | 0                              |
| disk                       | 5                              |
| extra_specs                | {"hw:cpu_policy": "dedicated"} |
| id                         | 200                            |
| name                       | m1.dedicated                   |
| os-flavor-access:is_public | True                           |
| ram                        | 512                            |
| rxtx_factor                | 1.0                            |
| swap                       |                                |
| vcpus                      | 2                              |
+----------------------------+--------------------------------+
[root@serverX]# 

[root@serverX]# nova boot --flavor 1662977424 --image cirros vm1
+--------------------------------------+----------------------------------------------------+
| Property                             | Value                                              |
+--------------------------------------+----------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                             |
| OS-EXT-AZ:availability_zone          |                                                    |
| OS-EXT-SRV-ATTR:host                 | -                                                  |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                                  |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000041                                  |
| OS-EXT-STS:power_state               | 0                                                  |
| OS-EXT-STS:task_state                | scheduling                                         |
| OS-EXT-STS:vm_state                  | building                                           |
| OS-SRV-USG:launched_at               | -                                                  |
| OS-SRV-USG:terminated_at             | -                                                  |
| accessIPv4                           |                                                    |
| accessIPv6                           |                                                    |
| adminPass                            | HZC3q4NRVdvM                                       |
| config_drive                         |                                                    |
| created                              | 2016-08-18T14:55:48Z                               |
| flavor                               | tempest-test_flavor_prefer_-795153569 (1662977424) |
| hostId                               |                                                    |
| id                                   | 88d944be-e31d-4df7-a33e-b1acaeb156f3               |
| image                                | cirros (9c63f09c-dffc-467d-bb86-c926a822f6a4)      |
| key_name                             | -                                                  |
| metadata                             | {}                                                 |
| name                                 | vm1                                                |
| os-extended-volumes:volumes_attached | []                                                 |
| progress                             | 0                                                  |
| security_groups                      | default                                            |
| status                               | BUILD                                              |
| tenant_id                            | 1e8409b372294934841eeb5e5ef5cde4                   |
| updated                              | 2016-08-18T14:55:48Z                               |
| user_id                              | e62260f2a0b94f519e1e9cd9239c14b7                   |
+--------------------------------------+----------------------------------------------------+
[root@serverX]# nova boot --flavor 200 --image cirros vm2
+--------------------------------------+-----------------------------------------------+
| Property                             | Value                                         |
+--------------------------------------+-----------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                        |
| OS-EXT-AZ:availability_zone          |                                               |
| OS-EXT-SRV-ATTR:host                 | -                                             |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | -                                             |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000042                             |
| OS-EXT-STS:power_state               | 0                                             |
| OS-EXT-STS:task_state                | scheduling                                    |
| OS-EXT-STS:vm_state                  | building                                      |
| OS-SRV-USG:launched_at               | -                                             |
| OS-SRV-USG:terminated_at             | -                                             |
| accessIPv4                           |                                               |
| accessIPv6                           |                                               |
| adminPass                            | j5ZfoA7fDJhs                                  |
| config_drive                         |                                               |
| created                              | 2016-08-18T14:56:00Z                          |
| flavor                               | m1.dedicated (200)                            |
| hostId                               |                                               |
| id                                   | a31ccd34-65c3-43d3-9e3a-f4feb338cdda          |
| image                                | cirros (9c63f09c-dffc-467d-bb86-c926a822f6a4) |
| key_name                             | -                                             |
| metadata                             | {}                                            |
| name                                 | vm2                                           |
| os-extended-volumes:volumes_attached | []                                            |
| progress                             | 0                                             |
| security_groups                      | default                                       |
| status                               | BUILD                                         |
| tenant_id                            | 1e8409b372294934841eeb5e5ef5cde4              |
| updated                              | 2016-08-18T14:56:00Z                          |
| user_id                              | e62260f2a0b94f519e1e9cd9239c14b7              |
+--------------------------------------+-----------------------------------------------+
[root@serverX]# 


[root@serverX]# nova list
+--------------------------------------+------+--------+------------+-------------+---------------------+
| ID                                   | Name | Status | Task State | Power State | Networks            |
+--------------------------------------+------+--------+------------+-------------+---------------------+
| 88d944be-e31d-4df7-a33e-b1acaeb156f3 | vm1  | ACTIVE | -          | Running     | public=172.24.4.234 |
| a31ccd34-65c3-43d3-9e3a-f4feb338cdda | vm2  | ACTIVE | -          | Running     | public=172.24.4.235 |
+--------------------------------------+------+--------+------------+-------------+---------------------+

[root@serverX]# virsh vcpupin 88d944be-e31d-4df7-a33e-b1acaeb156f3
VCPU: CPU Affinity
----------------------------------
   0: 1
   1: 7

[root@serverX]# virsh vcpupin a31ccd34-65c3-43d3-9e3a-f4feb338cdda
VCPU: CPU Affinity
----------------------------------
   0: 8
   1: 2

[root@serverX]# lscpu -p
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
0,0,0,0,,0,0,0,0
1,1,0,0,,1,1,1,0
2,2,0,0,,2,2,2,0
3,3,0,0,,3,3,3,0
4,4,0,0,,4,4,4,0
5,5,0,0,,5,5,5,0
6,0,0,0,,0,0,0,0
7,1,0,0,,1,1,1,0
8,2,0,0,,2,2,2,0
9,3,0,0,,3,3,3,0
10,4,0,0,,4,4,4,0
11,5,0,0,,5,5,5,0
[root@serverX]#
Comment 12 errata-xmlrpc 2016-08-24 08:51:49 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-1761.html
Comment 13 Robert Love 2016-09-29 11:16:59 EDT
(In reply to Sahid Ferdjaoui from comment #5)
> (In reply to Stephen Gordon from comment #4)
> > Sahid do we also need to pick up:
> >
> > https://review.openstack.org/326944
> > https://review.openstack.org/285232
> 
> We are going to get the first one for free since it will be backported to
> stable/mitaka. The second one is a nice to have in case users request NUMA
> things without to have activated the NUMATopologyFilter.
> 
> I'll try to follow both patches to make sure we will have them for GA.

Did both of these change(set)s made it into OSP 9?
Comment 14 Sahid Ferdjaoui 2016-09-30 09:11:43 EDT
(In reply to Robert Love from comment #13)
> (In reply to Sahid Ferdjaoui from comment #5)
> > (In reply to Stephen Gordon from comment #4)
> > > Sahid do we also need to pick up:
> > >
> > > https://review.openstack.org/326944
> > > https://review.openstack.org/285232
> > 
> > We are going to get the first one for free since it will be backported to
> > stable/mitaka. The second one is a nice to have in case users request NUMA
> > things without to have activated the NUMATopologyFilter.
> > 
> > I'll try to follow both patches to make sure we will have them for GA.
> 
> Did both of these change(set)s made it into OSP 9?

The first one yes. The second one no, I don't think there is any BZ opened against it, as I have indicated it's a nice to have in case users request NUMA things without to have activated the NUMATopologyFilter which is clearly something we do not support.

Note You need to log in before you can comment on or make changes to this bug.