Enable NUMA and CPU pinning

Enable NUMA and CPU pinning

Before you proceed with enabling DPDK in your deployment, the NUMA and CPU pinning enablement is required.

To enable NUMA and CPU pinning:

  1. Verify your NUMA nodes on the host operating system:

    lscpu | grep NUMA
    

    Example of system response

    NUMA node(s):          1
    NUMA node0 CPU(s):     0-11
    
  2. Include the class to cluster.<NAME>.openstack.compute:

    - system.nova.compute.nfv.cpu_pinning
    
  3. Set the parameters in cluster.<name>.openstack.init on all compute nodes:

    • compute_kernel_isolcpu

      Set of host CPUs to be isolated from system. Kernel will not assign internal processes on this set of CPUs. This parameter is configured in grub

    • nova_cpu_pinning

      Subset of CPUs isolated on previous step. This parameter is used by Nova to run VMs only on isolated CPUs with dedicated pinning. Nova vCPU pinning set is configured in the nova.conf file after system isolates appropriate CPUs

    Example

    nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11"
    compute_kernel_isolcpu: ${_param:nova_cpu_pinning}
    
  4. Select from the following options:

    • If you are performing the initial deployment, proceed with the further environment configurations.

    • If you are making changes to an existing environment, re-run the salt configuration on the Salt Master node:

      salt "cmp*" state.sls linux,nova
      

      Note

      To take effect, servers require a reboot.

  5. If you need to set different values for each compute node, define them in cluster.<name>.infra.config.

    Example

    openstack_compute_node02:
      name: ${_param:openstack_compute_node02_hostname}
      domain: ${_param:cluster_domain}
      classes:
      - cluster.${_param:cluster_name}.openstack.compute
      params:
        salt_master_host: ${_param:reclass_config_master}
        linux_system_codename: xenial
        nova_cpu_pinning: "1,2,3,4,5,7,8,9,10,11"
        compute_kernel_isolcpu: "1,2,3,4,5,7,8,9,10,11"