Mohammed Naser | a546734 | 2024-04-30 00:34:16 -0400 | [diff] [blame] | 1 | ##################### |
| 2 | Neutron Configuration |
| 3 | ##################### |
| 4 | |
| 5 | Neutron, the network service for OpenStack, supports a variety of |
| 6 | configurations to optimize and tailor network performance. This includes |
| 7 | integrating hardware acceleration technologies to enhance networking |
| 8 | capabilities within your OpenStack environment. |
| 9 | |
| 10 | ********************* |
| 11 | Hardware Acceleration |
| 12 | ********************* |
| 13 | |
| 14 | Hardware acceleration can significantly improve network performance by |
| 15 | offloading specific network functions to directly to the network interface |
| 16 | card (NIC). This reduces the load on the host CPU and improves network |
| 17 | throughput and latency. |
| 18 | |
| 19 | ML2/OVS |
| 20 | ======= |
| 21 | |
| 22 | Mellanox Accelerated Switching And Packet Processing (ASAP\ :sup:`2`) |
| 23 | --------------------------------------------------------------------- |
| 24 | |
| 25 | Mellanox ASAP\ :sup:`2` is a technology that enables the offloading of the Open vSwitch |
| 26 | datapath to the NIC. This offloading is done by the NIC's firmware, and is |
| 27 | transparent to the host. |
| 28 | |
| 29 | Atmosphere uses the `netoffload <https://github.com/vexxhost/netoffload>`_ |
| 30 | project which takes care of validating and preparing the host for SR-IOV. |
| 31 | |
| 32 | It is recommended to follow the ``netoffload`` `BIOS, Kernel & NIC configuration <https://github.com/vexxhost/netoffload#bios-configuration>`_ |
| 33 | steps documented before getting started. |
| 34 | |
| 35 | Open vSwitch configuration |
| 36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 37 | |
| 38 | In order to enable hardware off-loading in Open vSwitch, you must make sure that |
| 39 | you deploy with the following configuration: |
| 40 | |
| 41 | .. code-block:: yaml |
| 42 | |
| 43 | openvswitch_helm_values: |
| 44 | conf: |
| 45 | ovs_hw_offload: |
| 46 | enabled: true |
| 47 | |
| 48 | Neutron configuration |
| 49 | ^^^^^^^^^^^^^^^^^^^^^ |
| 50 | |
| 51 | In order to enable hardware off-loading in Neutron, you can simply deploy it |
| 52 | with the following configuration and it will use `netoffload <https://github.com/vexxhost/netoffload>`_ |
| 53 | to automatically configure ASAP\ :sup:`2`. |
| 54 | |
| 55 | .. admonition:: About ``Init`` errors |
| 56 | :class: info |
| 57 | |
| 58 | If you see an Init error when deploying Neutron, you may need to look at the |
| 59 | logs of the ``netoffload`` container to see what went wrong. |
| 60 | |
| 61 | .. code-block:: yaml |
| 62 | |
| 63 | neutron_helm_values: |
| 64 | conf: |
| 65 | netoffload: |
| 66 | asap2: |
| 67 | - dev: enp97s0f0 |
| 68 | vfs: 16 |
| 69 | |
| 70 | ML2/OVN |
| 71 | ======= |
| 72 | |
| 73 | DPDK for provider & tenant networks |
| 74 | ----------------------------------- |
| 75 | |
| 76 | DPDK is a set of libraries and drivers for fast packet processing. It is |
| 77 | designed to run mostly in userspace, and can be used to accelerate network |
| 78 | functions in OpenStack. |
| 79 | |
| 80 | DPDK can be used with OVN to accelerate the processing of packets in the |
| 81 | datapath. This can be done by enabling the DPDK support in the OVN |
| 82 | configuration. |
| 83 | |
| 84 | Open vSwitch configuration |
| 85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 86 | |
| 87 | In order to enable hardware off-loading in Open vSwitch, you must make sure that |
| 88 | you deploy with the following configuration: |
| 89 | |
| 90 | .. code-block:: yaml |
| 91 | |
| 92 | openvswitch_helm_values: |
| 93 | conf: |
| 94 | ovs_dpdk: |
| 95 | enabled: true |
| 96 | socket_memory: 2048 |
| 97 | hugepages_mountpath: /dev/hugepages |
| 98 | vhostuser_socket_dir: vhostuser |
| 99 | lcore_mask: 0x1 |
| 100 | driver: mlx5_core |
| 101 | vhost_iommu_support: true |
| 102 | |
| 103 | For more details about configuring `socket_memory`, `lcore_mask`, and `driver` |
| 104 | parameters, please refer to the `OpenvSwitch documentation <https://docs.openvswitch.org/en/latest/intro/install/dpdk/#setup-ovs>`_. |
| 105 | |
| 106 | OVN configuration |
| 107 | ^^^^^^^^^^^^^^^^^ |
| 108 | |
| 109 | In order to enable hardware off-loading in OVN, you must make sure that |
| 110 | you deploy with the following configuration: |
| 111 | |
| 112 | .. code-block:: yaml |
| 113 | |
| 114 | ovn_helm_values: |
| 115 | network: |
| 116 | interface: |
| 117 | tunnel: br-ex |
| 118 | tunnel_network_cidr: 192.168.0.0/19 |
| 119 | conf: |
| 120 | ovn_bridge_mappings: external:br-ex |
| 121 | ovn_bridge_datapath_type: netdev |
| 122 | |
| 123 | Neutron configuration |
| 124 | ^^^^^^^^^^^^^^^^^^^^^ |
| 125 | |
| 126 | In order to enable hardware off-loading in Neutron, you can simply deploy it |
| 127 | with the following configuration and it will take care of creating the |
| 128 | DPDK interfaces for you. |
| 129 | |
| 130 | .. code-block:: yaml |
| 131 | |
| 132 | neutron_helm_values: |
| 133 | conf: |
| 134 | neutron: |
| 135 | DEFAULT: |
| 136 | global_physnet_mtu: 9100 |
| 137 | plugins: |
| 138 | ml2_conf: |
| 139 | ml2: |
| 140 | path_mtu: 9100 |
| 141 | physical_network_mtus: external:9100 |
| 142 | ml2_type_vxlan: |
| 143 | vni_ranges: 2000:1000000 |
| 144 | ovs_dpdk: |
| 145 | enabled: true |
| 146 | update_dpdk_bond_config: true |
| 147 | driver: mlx5_core |
| 148 | bonds: |
| 149 | - name: dpdkbond |
| 150 | bridge: br-ex |
| 151 | migrate_ip: true |
| 152 | mtu: 9100 |
| 153 | n_rxq: 2 |
| 154 | n_txq: 2 |
| 155 | n_rxq_size: 2048 |
| 156 | n_txq_size: 2048 |
| 157 | vhost_iommu_support: true |
| 158 | ovs_options: 'bond_mode=balance-tcp lacp=active bond_updelay=10 bond_downdelay=10 other_config:lacp-time=fast' |
| 159 | nics: |
| 160 | - name: dpdk_b0s0 |
| 161 | pci_id: '0000:c1:00.0' |
| 162 | - name: dpdk_b0s1 |
| 163 | pci_id: '0000:c1:00.1' |
| 164 | modules: |
| 165 | - name: dpdk |
| 166 | log_level: info |
| 167 | nics: null |
| 168 | |
| 169 | Flavor configuration |
| 170 | ^^^^^^^^^^^^^^^^^^^^ |
| 171 | |
| 172 | In order to use DPDK with OVN, you must create a flavor that supports DPDKw |
| 173 | which also includes making changes for the services that use the service |
| 174 | virtual machine model such as Octavia and Manila. |
| 175 | |
| 176 | .. code-block:: yaml |
| 177 | |
| 178 | nova_flavors: |
| 179 | - disk: 1 |
| 180 | name: m1.tiny |
| 181 | ram: 512 |
| 182 | vcpus: 1 |
| 183 | extra_specs: |
| 184 | "hw:vif_multiqueue_enabled": 'true' |
| 185 | "hw:mem_page_size": 'large' |
| 186 | - disk: 20 |
| 187 | name: m1.small |
| 188 | ram: 2048 |
| 189 | vcpus: 1 |
| 190 | extra_specs: |
| 191 | "hw:vif_multiqueue_enabled": 'true' |
| 192 | "hw:mem_page_size": 'large' |
| 193 | |
| 194 | manila_flavor_extra_specs: |
| 195 | "hw:vif_multiqueue_enabled": 'true' |
| 196 | "hw:mem_page_size": large |
| 197 | |
| 198 | octavia_amphora_flavor_extra_specs: |
| 199 | "hw:vif_multiqueue_enabled": 'true' |
| 200 | "hw:mem_page_size": large |