Ask Your Question

Revision history [back]

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.
Quick test here :-
http://bderzhavets.blogspot.com/2015/07/cpu-pinning-and-numa-topology-on-rdo_31.html

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.
Quick test here :-
http://bderzhavets.blogspot.com/2015/07/cpu-pinning-and-numa-topology-on-rdo_31.html

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1
Replace word "perfomance" with "storage" bellow

Finally, we must add some hosts to our performance host aggregate.Hosts that are not intended to be targets for pinned instances should be added to the normal host aggregate:
$ nova aggregate-add-host 1 compute1.nova

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.
Quick test here :-
http://bderzhavets.blogspot.com/2015/07/cpu-pinning-and-numa-topology-on-rdo_31.html

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1
Replace word "perfomance" with "storage" bellow
1 in your case I would try :-

Finally, we must add some hosts to our performance host aggregate.Hosts that are not intended to be targets for pinned instances should be added to the normal host aggregate:
$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_INTENSIVE set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.
Quick test here :-
http://bderzhavets.blogspot.com/2015/07/cpu-pinning-and-numa-topology-on-rdo_31.html

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1 in your case I would try :-

$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_INTENSIVE ID_OF_YOUR_STORAGE_OPTIMIZED set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1 in your case I would try :-

$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_OPTIMIZED set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova

===========================================================================================

This post has been just written to address the question been asked . 
Pinning particular flavor to selected Compute Node RDO Newton RC1.

http://bderzhavets.blogspot.com/2016/09/pinning-particular-flavor-to-seleted.html

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1 in your case I would try :-

$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_OPTIMIZED set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova

=================================================================================================================================================================

Try this logic :-

This post [root@overcloud-controller-0 ~]# nova aggregate-create storage
+----+---------+-------------------+-------+----------+

| Id | Name    | Availability Zone | Hosts | Metadata |

+----+---------+-------------------+-------+----------+
| 1  | storage | -                 |       |          |
+----+---------+-------------------+-------+----------+

[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 1 storage=true

Metadata has been just written to address the question successfully updated for aggregate 1.
+----+---------+-------------------+-------+----------------+
| Id | Name    | Availability Zone | Hosts | Metadata       |
+----+---------+-------------------+-------+----------------+
| 1  | storage | -                 |       | 'storage=true' |
+----+---------+-------------------+-------+----------------+


[root@overcloud-controller-0 ~]# nova aggregate-create normal
+----+--------+-------------------+-------+----------+
| Id | Name   | Availability Zone | Hosts | Metadata |

+----+--------+-------------------+-------+----------+

| 2  | normal | -                 |       |          |
+----+--------+-------------------+-------+----------+

[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 2 storage=false
Metadata has been asked . 
Pinning particular flavor to selected Compute Node RDO Newton RC1.
successfully updated for aggregate 2.
+----+--------+-------------------+-------+-----------------+
| Id | Name   | Availability Zone | Hosts | Metadata        |
+----+--------+-------------------+-------+-----------------+
| 2  | normal | -                 |       | 'storage=false' |
+----+--------+-------------------+-------+-----------------+
[root@overcloud-controller-0 ~]# nova flavor-key 3 set aggregate_instance_extra_specs:storage=true
[root@overcloud-controller-0 ~]# nova hypervisor-list
+----+-------------------------------------+-------+---------+

| ID | Hypervisor hostname                 | State | Status  |

+----+-------------------------------------+-------+---------+
| 1  | overcloud-novacompute-0.localdomain | up    | enabled |
| 2  | overcloud-novacompute-1.localdomain | up    | enabled |
+----+-------------------------------------+-------+---------+

[root@overcloud-controller-0 ~]# nova aggregate-add-host 1 overcloud-novacompute-1.localdomain
Host overcloud-novacompute-1.localdomain has been successfully added for aggregate 1
+----+---------+-------------------+---------------------------------------+----------------+
| Id | Name    | Availability Zone | Hosts                                 | Metadata       |
+----+---------+-------------------+---------------------------------------+----------------+

| 1  | storage | -                 | 'overcloud-novacompute-1.localdomain' | 'storage=true' |
+----+---------+-------------------+---------------------------------------+----------------+

[root@overcloud-controller-0 ~]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |

+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 2  | m1.small  | 1000      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 2000      | 20   | 0         |      | 1     | 1.0         | True      |

+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

[root@overcloud-controller-0 ~]# nova boot --flavor 3 --key-name oskey092616 \
                  --image 14359d87-0ae1-440d-ad6e-5a22f7f98d72  \
                  --nic net-id=2c7d77a1-7761-4a75-b3ae-57e234f83040 CentOS72Devs01

http://bderzhavets.blogspot.com/2016/09/pinning-particular-flavor-to-seleted.html

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.

UPDATE 09/27/2016
Ugly workaround ( create bash script ) as admin

In shell loop
$ nova boot --image <uuid> --flavor mx.large --key_name oskey092716 --availability-zone nova:serverx
thus favor mx.large will boot nova instance on Compute Node serverx  (x=1,2,3,...)

I understand that it is worse case scenariario if host-aggregates syntax won't help
END UPDATE

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1 in your case I would try :-

$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_OPTIMIZED set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova

======================================================================

Try this logic :-

[root@overcloud-controller-0 ~]# nova aggregate-create storage
+----+---------+-------------------+-------+----------+

| Id | Name    | Availability Zone | Hosts | Metadata |

+----+---------+-------------------+-------+----------+
| 1  | storage | -                 |       |          |
+----+---------+-------------------+-------+----------+

[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 1 storage=true

Metadata has been successfully updated for aggregate 1.
+----+---------+-------------------+-------+----------------+
| Id | Name    | Availability Zone | Hosts | Metadata       |
+----+---------+-------------------+-------+----------------+
| 1  | storage | -                 |       | 'storage=true' |
+----+---------+-------------------+-------+----------------+


[root@overcloud-controller-0 ~]# nova aggregate-create normal
+----+--------+-------------------+-------+----------+
| Id | Name   | Availability Zone | Hosts | Metadata |

+----+--------+-------------------+-------+----------+

| 2  | normal | -                 |       |          |
+----+--------+-------------------+-------+----------+

[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 2 storage=false
Metadata has been successfully updated for aggregate 2.
+----+--------+-------------------+-------+-----------------+
| Id | Name   | Availability Zone | Hosts | Metadata        |
+----+--------+-------------------+-------+-----------------+
| 2  | normal | -                 |       | 'storage=false' |
+----+--------+-------------------+-------+-----------------+
[root@overcloud-controller-0 ~]# nova flavor-key 3 set aggregate_instance_extra_specs:storage=true
[root@overcloud-controller-0 ~]# nova hypervisor-list
+----+-------------------------------------+-------+---------+

| ID | Hypervisor hostname                 | State | Status  |

+----+-------------------------------------+-------+---------+
| 1  | overcloud-novacompute-0.localdomain | up    | enabled |
| 2  | overcloud-novacompute-1.localdomain | up    | enabled |
+----+-------------------------------------+-------+---------+

[root@overcloud-controller-0 ~]# nova aggregate-add-host 1 overcloud-novacompute-1.localdomain
Host overcloud-novacompute-1.localdomain has been successfully added for aggregate 1
+----+---------+-------------------+---------------------------------------+----------------+
| Id | Name    | Availability Zone | Hosts                                 | Metadata       |
+----+---------+-------------------+---------------------------------------+----------------+

| 1  | storage | -                 | 'overcloud-novacompute-1.localdomain' | 'storage=true' |
+----+---------+-------------------+---------------------------------------+----------------+

[root@overcloud-controller-0 ~]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |

+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 2  | m1.small  | 1000      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 2000      | 20   | 0         |      | 1     | 1.0         | True      |

+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

[root@overcloud-controller-0 ~]# nova boot --flavor 3 --key-name oskey092616 \
                  --image 14359d87-0ae1-440d-ad6e-5a22f7f98d72  \
                  --nic net-id=2c7d77a1-7761-4a75-b3ae-57e234f83040 CentOS72Devs01

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.

UPDATE 09/27/2016
Ugly workaround ( create bash script ) as admin

In shell loop
loop ( X supposed to work as counter)
$ nova boot --image <uuid> --flavor mx.large m$X.large --key_name oskey092716 \
   --availability-zone nova:serverx
nova:server$X
thus favor mx.large will boot nova instance on Compute Node serverx  (x=1,2,3,...)
(X=1,2,3,... or whatever you need )

I understand that it is worse worst case scenariario scenario if host-aggregates syntax won't help
END UPDATE

UPDATE 09/26/2016
Link 1 addresses questions
CPU Pinning in OpenStack

Reserving dedicated cores on the compute host(s) for host processes, avoiding host process and guest virtual machine instances from fighting for the same CPU cores;
Reserving dedicated cores on the compute host(s) for the virtual machine instances themselves;
Enabling the required scheduler filters;
Creating a host aggregate to add all hosts configured for CPU pinning to;
Creating a performance focused flavor to target this host aggregate; and
Launching an instance with CPU pinning!

Continue follow link 1 in your case I would try :-

$ nova aggregate-create storage
$ nova aggregate-set-metadata 1 storage=true
$ nova aggregate-create normal
$ nova aggregate-set-metadata 2 storage=false
$ nova flavor-key ID_OF_YOUR_STORAGE_OPTIMIZED set aggregate_instance_extra_specs:storage=true
$ nova aggregate-add-host 1 compute1.nova

======================================================================

Try this logic :-

[root@overcloud-controller-0 ~]# nova aggregate-create storage
+----+---------+-------------------+-------+----------+

| Id | Name    | Availability Zone | Hosts | Metadata |

+----+---------+-------------------+-------+----------+
| 1  | storage | -                 |       |          |
+----+---------+-------------------+-------+----------+

[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 1 storage=true

Metadata has been successfully updated for aggregate 1.
+----+---------+-------------------+-------+----------------+
| Id | Name    | Availability Zone | Hosts | Metadata       |
+----+---------+-------------------+-------+----------------+
| 1  | storage | -                 |       | 'storage=true' |
+----+---------+-------------------+-------+----------------+


[root@overcloud-controller-0 ~]# nova aggregate-create normal
+----+--------+-------------------+-------+----------+
| Id | Name   | Availability Zone | Hosts | Metadata |

+----+--------+-------------------+-------+----------+

| 2  | normal | -                 |       |          |
+----+--------+-------------------+-------+----------+

[root@overcloud-controller-0 ~]# nova aggregate-set-metadata 2 storage=false
Metadata has been successfully updated for aggregate 2.
+----+--------+-------------------+-------+-----------------+
| Id | Name   | Availability Zone | Hosts | Metadata        |
+----+--------+-------------------+-------+-----------------+
| 2  | normal | -                 |       | 'storage=false' |
+----+--------+-------------------+-------+-----------------+
[root@overcloud-controller-0 ~]# nova flavor-key 3 set aggregate_instance_extra_specs:storage=true
[root@overcloud-controller-0 ~]# nova hypervisor-list
+----+-------------------------------------+-------+---------+

| ID | Hypervisor hostname                 | State | Status  |

+----+-------------------------------------+-------+---------+
| 1  | overcloud-novacompute-0.localdomain | up    | enabled |
| 2  | overcloud-novacompute-1.localdomain | up    | enabled |
+----+-------------------------------------+-------+---------+

[root@overcloud-controller-0 ~]# nova aggregate-add-host 1 overcloud-novacompute-1.localdomain
Host overcloud-novacompute-1.localdomain has been successfully added for aggregate 1
+----+---------+-------------------+---------------------------------------+----------------+
| Id | Name    | Availability Zone | Hosts                                 | Metadata       |
+----+---------+-------------------+---------------------------------------+----------------+

| 1  | storage | -                 | 'overcloud-novacompute-1.localdomain' | 'storage=true' |
+----+---------+-------------------+---------------------------------------+----------------+

[root@overcloud-controller-0 ~]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |

+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 2  | m1.small  | 1000      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 2000      | 20   | 0         |      | 1     | 1.0         | True      |

+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

[root@overcloud-controller-0 ~]# nova boot --flavor 3 --key-name oskey092616 \
                  --image 14359d87-0ae1-440d-ad6e-5a22f7f98d72  \
                  --nic net-id=2c7d77a1-7761-4a75-b3ae-57e234f83040 CentOS72Devs01

END UPDATE

I worked on this a while ago. However instructions from
http://redhatstackblog.redhat.com/2015/05/05/cpu-pinning-and-numa-topology-awareness-in-openstack-compute/
worked for me.