[Openstack] Not able to set cpuset and vcpupin attibutes guest xml

Srinivasa Rao Ragolu sragolu at mvista.com
Tue Dec 23 08:07:26 UTC 2014


Hi All,

I am working on CPU Pinning feature of master branch of NOVA. Setup is
devstack.
I want to pin vcpus to pcpus using flavors and I have only one compute
node. No host aggregates
created.


I have created cpu pinning flavor and set cpuset and vcpupin parameters
using

1) nova flavor-create pinned.medium 6 2048 1 2
2) nova flavor-key 6 set "hw:cpu_policy"="dedicated"
3) nova flavor-key 6 set "hw:cpu_threads_policy"="prefer

4) nova flavor-key set 6 set vcpupin:0=1

5) nova flavor-key set 6 set vcpupin:1=1

srinivas at srinivas:~/devstack$ nova flavor-show 6
+----------------------------+-------------------------------------------------------------------------------------------------------+
| Property                   | Value
                                                              |
+----------------------------+-------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | False
                                                              |
| OS-FLV-EXT-DATA:ephemeral  | 0
                                                              |
| disk                       | 1
                                                              |
| extra_specs                | {"hw:cpu_policy": "dedicated",
"vcpupin:0": "1", "hw:cpu_threads_policy": "prefer", "vcpupin:1": "1"}
|
| id                         | 6
                                                              |
| name                       | pinned.medium
                                                              |
| os-flavor-access:is_public | True
                                                              |
| ram                        | 2048
                                                              |
| rxtx_factor                | 1.0
                                                              |
| swap                       |
                                                              |
| vcpus                      | 2
                                                              |
+----------------------------+-------------------------------------------------------------------------------------------------------+


Now If I try to launch guest vm, I could not able to see above set cpuset
and vcpupin parameters in guest.xml. vcpus are running on different cores
on its own.

Please suggest me, how can I set above parameters in guest xml and validate
CPU Pinning feature.

Thanks in advance,
Srinivas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20141223/ac71aa7b/attachment.html>


More information about the Openstack mailing list