Ask Your Question
0

cpu pin with nova

asked 2017-09-21 07:47:25 -0500

ashu gravatar image
 Hi Team

I need to map the vcpu associated with the Openstack vnf with the physical cores 6,7 of the host.For this,I have added below lines in nova.conf..

vcpu_pin_set = 6,7

Also for better performance,I have isolated  the above cores from the host process using isolcpus in /proc/cmdline.Below is the output of /proc/cmdline..

BOOT_IMAGE=/boot/vmlinuz-4.10.0-35-generic root=UUID=f3d92ebb-a521-49c5-9a88-1b8b4947591d ro default_hugepagesz=1G hugepagesz=1G hugepages=16 hugepagesz=2M hugepages=2048 iommu=pt intel_iommu=on isolcpus=2,5,6,7

Below is the flavor details..

nova flavor-show m1.medium
+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property                   | Value                                                                                                                                                       |
+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                                                                                                                                       
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                                                           
| disk                       | 40                                                                                                                                                          
| extra_specs                | {"aggregate_instance_extra_specs:pinned": "true", "hw:cpu_policy": "dedicated", "hw:mem_page_size": "large", "hw:numa_nodes": "1", "hw:numa_cpus.1": "6,7"} |
| id                         | 3                                                                                                                                                           
| name                       | m1.medium                                                                                                                                                   
| os-flavor-access:is_public | True                                                                                                                                                        
| ram                        | 4096                                                                                                                                                        
| rxtx_factor                | 1.0                                                                                                                                                         
| swap                       |                                                                                                                                                             
| vcpus                      | 2                                                                                                                                                           
+----------------------------+----------------------------------------------------------------------------------------------------------------------

However whenever I launch the vnf with 2 cores,it gets mapped to physical cores 0 and 3.Please help me regarding this.

Thanks
Ashu Jain
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-04-01 20:52:00 -0500

As I known, the "hw:numa_cpus.1": "6,7" does not mean the guest vcpu should bind to host cpu6 and cpu7. It means guest cpu6 and cpu7 should be located on the second numa .1 (starts with 0).

Details: https://docs.openstack.org/nova/pike/admin/cpu-topologies.html (https://docs.openstack.org/nova/pike/...)

The allocation of instances vCPUs and memory from different host NUMA nodes can be configured. This allows for asymmetric allocation of vCPUs and memory, which can be important for some workloads. To spread the 6 vCPUs and 6 GB of memory of an instance across two NUMA nodes and create an asymmetric 1:2 vCPU and memory mapping between the two nodes, run:

$ openstack flavor set m1.large --property hw:numa_nodes=2
$ openstack flavor set m1.large \  # configure guest node 0
  --property hw:numa_cpus.0=0,1 \
  --property hw:numa_mem.0=2048
$ openstack flavor set m1.large \  # configure guest node 1
  --property hw:numa_cpus.1=2,3,4,5 \
  --property hw:numa_mem.1=4096
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-09-21 07:47:25 -0500

Seen: 69 times

Last updated: Sep 21 '17