Created on Feb 10, 2022
Abbreviations and Acronyms
|AI||Artificial Intelligence||IPoIB||IP over InfiniBand|
|BM||Bare Metal||MLNX_OFED||NVIDIA OpenFabrics Enterprise Distribution for Linux (network driver)|
|BOM||Bill of Materials||OC||Overcloud|
|CUDA||Compute Unified Device Architecture||OS||Operating System|
|DIB||Disk Image Builder||PKey||Private Key|
|DHCP||Dynamic Host Configuration Protocol||RDG||Reference Deployment Guide|
|GPU||Graphics Processing Unit||RDMA||Remote Direct Memory Access|
|HA||High Availability||RDO||RPM Distribution of OpenStack|
|HDR||High Data Rate - 200Gb/s||SDN||Software Defined Networking|
|HPC||High Performance Computing||TripleO||OpenStack On OpenStack|
|IB||InfiniBand||UFM||Unified Fabric Manager|
|IPMI||Intelligent Platform Management Interface||VLAN||Virtual LAN|
|UFM||Unified Fabric Manager|
- NVIDIA ConnectX InfiniBand Adapters
- NVIDIA InfiniBand Switches
- NVIDIA Unified Fabric Manager (UFM)
- NVIDIA Cloud Native Supercomputing
- NVIDIA GPUDirect
- TripleO OpenStack Deployment
- RDO OpenStack Project
The OpenStack cloud operating system includes support for Bare Metal cloud services using GPUs over an InfiniBand network. This allows a multi-tenant, secure accelerated Bare Metal cloud deployment that provides best-in-class performance for HPC and AI workloads.
The following Reference Deployment Guide (RDG) demonstrates a complete deployment of OpenStack Bare Metal Cloud for HPC/AI multi-tenant workloads accelerated by NVIDIA® GPUs, Adapters, and Quantum InfiniBand fabric. The RDG covers a single-rack reference deployment that could easily scale up to multi-rack solution.
This RDG includes a solution design, scale considerations, hardware BoM (Bill of Materials) and the complete list of steps to provision Bare Metal tenant instances over InfiniBand fabric and perform GPUDirect-RDMA infrastructure bandwidth testing.
The solution below is based on OpenStack RDO ("Wallaby" Release) as a cloud platform with integrated InfiniBand support deployed using TripleO software.
Key Components and Technologies
- NVIDIA A100 Tensor Core GPU delivers unprecedented acceleration at every scale to power the world’s highest-performing elastic data centers for AI, data analytics, and HPC. Powered by the NVIDIA Ampere Architecture, A100 is the engine of the NVIDIA data center platform. A100 provides up to 20X higher performance over the prior generation and can be partitioned into seven GPU instances to dynamically adjust to shifting demands.
- ConnectX®-6 InfiniBand adapter cards are a key element in the NVIDIA Quantum InfiniBand platform. ConnectX-6 provides up to two ports of 200Gb/s InfiniBand connectivity with extremely low latency, high message rate, smart offloads, and NVIDIA In-Network Computing acceleration that improve performance and scalability.
- The NVIDIA Quantum InfiniBand switches provide high-bandwidth performance, low power, and scalability. NVIDIA Quantum switches optimize data center connectivity with advanced routing and congestion avoidance capabilities.
The LinkX® product family of cables and transceivers provides complete connectivity matrix for InfiniBand data center infrastructures.
- NVIDIA® UFM® (Unified Fabric Manager) platforms revolutionize data center networking management by combining enhanced, real-time network telemetry with AI-powered cyber intelligence and analytics to support scale-out InfiniBand data centers.
- OpenStack is the most widely deployed open-source cloud software in the world. As a cloud operating system, it controls large pools of compute, storage, and networking resources throughout a datacenter, all managed and provisioned through APIs with common authentication mechanisms. Beyond standard infrastructure-as-a-service (Iaas) functionality, additional components provide orchestration, fault management and service management amongst other services, to ensure high availability of user applications.
- RDO (RPM Distribution of OpenStack) is a freely available community-supported distribution of OpenStack originated by Red Hat. RDO runs on CentOS, Red Hat Enterprise Linux (RHEL) and Fedora, and makes the latest OpenStack development release available for use.
Below is an illustration of the solution's logical design.
- Single 200Gb/s InfiniBand fabric is used for both tenant and OpenStack control networks.
- Neutron components (api/dhcp/l3) include the required code to support InfiniBand on the Controller node
Below is an illustration of the solution's fabric topology.
Reference Architecture Scale
- Initial Setup for a One Switch Solution:
- Single rack
- 1 x NVIDIA Quantum QM8700 200G InfiniBand Switch
- 3 x Controller Nodes
- 2 x Bare Metal Tenant Nodes
- 1 x Fabric Management Node
- 1 x 1GbE Switch (for multiple 1GbE networks isolated with VLANs)
Scaled Setup for a Two-Layer Fat-Tree Topology:
This deployment scenario scales up to 20 Spine switches and 40 Leaf switches, and supports up to 800 servers.
Scale considerations refer to high speed InfiniBand fabric only and do not cover provisioning, IPMI and External networks.
Below is an illustration of the solution's host design.
- PKey is used to isolate the Bare Metal instances traffic on the tenant network they belong to.
- Tenant NameSpaces include DHCP server / vRouter (L3 Agent) with IPoIB support and configured with a PKey to isolate the traffic on the tenant network they belong to.
Application Logical Design
Software Stack Components
Bill of Materials (BoM)
The BoM above refers to 1xRack based reference architecture.
Solution Configuration and Deployment
- When using a dual-port InfiniBand host channel adapter (HCA), only the first port should be wired to the fabric.
From the OS perspective, the network device ib0 will be used for IPoIB traffic.
- The Provisioning network is used for Overcloud Nodes deployment by the Undercloud, and the OcProvisioning network is used for Bare Metal Tenant Nodes deployment by the Overcloud Controller Nodes.
- A single 1GbE Switch was used in this case for multiple 1GbE networks isolated with VLANs.
- The UFM Node is connected to the External network in order to pull the UFM application container from the internet. It is also possible to use local images without internet connectivity.
- Connect all nodes to the IPMI network.
- Connect the IB Switch Mgmt. port to the OpenStack Provisioning network and allocate an IP address outside of the Overcloud nodes range.
- Connect the UFM Node to OpenStack Provisioning network and allocate an IP address outside of the Overcloud nodes range.
- Connect the UFM Node, the Overcloud nodes (Controller nodes) and the Bare Metal nodes to the IB Fabric.
- Connect the OpenStack Undercloud and Overcloud nodes (Controller nodes) to the OpenStack Provisioning network.
Connect the Undercloud, Controllers, and UFM nodes to the External (Public) network.
IPoIB Fabric Configuration
172.16.0.0 / 24
172.17.0.0 / 24
172.18.0.0 / 24
Tenant VLAN <N>
Created by Tenant
In Ethernet OpenStack deployments, VLANs can be used for tenant isolation. In InfiniBand, Partition Keys (PKeys) are used to gain tenant isolation.
Tenant network VLAN ID "N" is mapped to tenant PKey "80<Hex_N>". In this RDG we use tenant VLAN ID 101 which is converted to PKey 0x8065.
- Hardware specifications are identical for servers with the same role (Controller Nodes/Bare Metal Nodes, etc.)
- All ConnectX-6 Adapters ports used in Controller, Bare Metal and Fabric Management nodes should be set to operate in InfiniBand mode (default).
- Bare Metal Nodes BIOS should be configured with the following:
- UEFI mode
- For GPUDirect usage - Virtualization and SR-IOV should be disabled
- PXE boot is set in server boot order
- Adapter PXE is enabled and PKey is matching the OpenStack provisioning network VLAN ID ("70" in the example used in this article)
Fabric Management Node (UFM) Installation
The "Fabric Management" is a Linux-based host running UFM Enterprise application container.
In this article, a single Fabric Management node is deployed. High Availability deployment is possible, however, not covered.
Fabric Management Node OS
Install the OS on the Fabric Mgmt Node. (In this solution we have used Ubuntu 18.04 OS).
- Install NVIDIA MLNX_OFED network drivers. For further information refer to this link.
Install and enable Docker service—Ubuntu Docker Installation.
- Use the "ibstat" command to make sure the Fabric Management Node is connected to the InfiniBand Fabric, and the link is up.
- Make sure the Fabric Management Node is connected to the OpenStack provisioning network and allocate an IP Address outside of the Overcloud nodes range. In our example we have assigned IP 192.168.24.200 to this node.
Set a dummy IP address on the InfiniBand ib0 interface and make sure it is in "up" state. This step is a prerequisite for UFM application installation.
ib0 is the default fabric interface used by UFM installer. If you connected ib1 to the InfiniBand fabric, make sure to specify the interface during UFM installer execution.
- Make sure External access is available as it will be used to pull the UFM application container from the internet. It is also possible to use local images without internet connectivity.
UFM Enterprise Application Container
Additional information about UFM Container installation is available here.
Create a host directory to store the UFM application configuration.
Create a host directory to store the UFM application license, and place the license there.
Make sure internet access is available and pull the UFM Enterprise Installer image from the Docker hub repository.
Run the Installer application container with the local directory mapped, and verify it is up.
- For all installer options and default values issue the following command: "docker run --rm mellanox/ufm-enterprise-installer:latest -h"
- The Installer container will bring up a UFM Enterprise application container named "ufm" and will terminate.
Verify the UFM Enterprise application container is up and the UFM service is running.
Connect from a client on the External or the Provisioning networks to the UFM WebUI using the following URL.
Default Login Credentials: admin/123456
Generate UFM API Access Token and copy it for later usage.
The token will be used in OpenStack Overcloud deployment file neutron-ml2-mlnx-sdn-bm.yaml
OpenStack Undercloud Node Preparation and Installation
In the solution below we use RDO OpenStack Deployment using TripleO.
- Follow the Undercloud Installation procedure described here up to "Prepare the configuration file" section. The following components were used:
- CentOS Stream release 8 OS with 100GB root partition
"Wallaby" OpenStack Release TripleIO repositories
Undercloud configuration file "undercloud.conf"
Create the following Container Image Preparation configuration file "containers-prepare-parameter-ib.yaml" referred to in "undercloud.conf" and place it under
Complete Undercloud installation as a stack user.
Build Overcloud Images based on CentOS 8 and Wallaby release components. The full procedure is described here.
Upload the Overcloud images into the image store as stack user.
Prepare the overcloud baremetal nodes inventory file " instackenv.json" with the nodes IPMI information. Our inventory includes 3 controller nodes. Make sure to update the file with the IPMI server addresses and credentials.
Import the overcloud baremetal nodes inventory and wait until all nodes are listed in "manageable" state.
OpenStack Overcloud Introspection and IB Infrastructure Configuration
On the Undercloud node, start the Overcloud nodes Introspection procedure.
- During the Introspection phase, the Overcloud InfiniBand devices will appear in the UFM Web UI. Use the time that setup devices are discovered to complete the creation of control PKeys as described in the next step. If Introspection is completed before you are able to set the PKey configuration, and InfiniBand devices are no longer presented in UFM, repeat the Introspection to complete the PKey configuration steps.
- The "baremetal" nodes described in this section refer to the nodes which will be deployed as Overcloud Nodes, and not to the Tenant Bare Metal instances which will be created later on.
- "--boot-mode bios" is used to deploy Overcloud servers with Legacy BIOS mode. If the nodes are configured with UEFI BIOS, this flag can be omitted
While setup devices are discovered, log into UFM Web UI and configure the control PKeys:
The procedure includes the following steps:
Verify all setup devices are discovered.
Create PKey with Hex ID.
Add the Overcloud nodes (Controller nodes) GUIDs as a member in the control PKey.
- Repeat the steps for every Control PKey.
Proceed to the Overcloud Deployment steps below only after all Control PKeys are defined with Controller nodes ports GUID as members.
OpenStack Overcloud Deployment
Download to the Undercloud node and extract the cloud deployment configuration files used for the reference solution in this article: doc-68323870-RDG-Config-Files.zip
Modify the deployment files according to your needs and configuration and place it under the
/home/stack/templates/IBdirectory. The following files were used to deploy the cloud described in this article:
- controller-ib-bm-nics.j2 (referred in node-info-ib-bm.yaml)
This configuration file contains the connection details of the Fabric Management Node.
- Use the UFM API Token collected in previous steps for the MlnxSDNToken parameter.
- Use the UFM Node IP on the OpenStack Provisioning network for the MlnxSDNUrl parameter (192.168.24.200)
- MlnxSDNUsername and MlnxSDNPassword should be included with empty value
- In this configuration file, the "datacentre" physical network is mapped to the Open vSwitch driver (Ethernet fabric) while "ibnet" physical network is mapped to the IPoIB driver (InfiniBand fabric).
- In order to limit the IB-SDN control to the InfiniBand physical network only, explicitly specify the InfiniBand physical network name (for example "physical_networks=ibnet") under the [sdn] section in ml2_conf.ini file on the Controller nodes after the cloud is deployed and restart the neutron_api service container and UFM application.
As "stack" user, issue the deploy command to start Overcloud deployment with the prepared configuration files.
OpenStack Bare Metal Cloud Images Creation
Run the build command below on a CentOS Stream 8 Disk Image Builder machine in order to create a CentOS 8 Stream Guest OS image:
- The command might require setting proper environment variables. For more information regarding image creation and customization procedure refer to: How-to: Create OpenStack Cloud Image with NVIDIA GPU and Network Drivers
- The outcome of the command will be a centos8-stream.qcow image file located under /home/stack/images/ directory.
- In the example described in this document, the Guest OS image is customized with "cloud-init" element for access credentials, "cloud-init-net-conf-disabled" element for NetworkManager interface auto configuration and "rdma-core" element for rdma-core package installation. Refer to the article above for further information regarding the elements.
- The image generated using the specified command is suitable for EFI booting. Make sure to configure the Bare Metal servers with UEFI BIOS mode.
- The Undercloud node can be used as a Disk Image Builder (DIB) machine.
- For CentOS 7 Guest OS image with IPoIB deployment support, use "mofed" and "dhclient-hw" DIB elements as described in the article: How-to: Create OpenStack Cloud Image with NVIDIA GPU and Network Drivers
Copy the Guest OS image prepared in the previous section to the Undercloud Node and upload it to the Overcloud image store together with the Ironic Deploy images:
- The Ironic Deploy kernel and initramfs images are automatically created under /home/stack/images/ directory during OpenStack Undercloud Node Preparation and Installation phase.
- For CentOS 7 Deploy Images with IPoIB deployment support, re-build the deploy images with "mofed" and "dhclient-hw" DIB elements as described in the article: How-to: Create OpenStack Cloud Image with NVIDIA GPU and Network Drivers
Bare Metal Nodes Enrollment and Provisioning
On the OpenStack Overcloud, create a provisioning network and subnet that will be used for Bare Metal tenant servers deployment by the Overcloud Controller Ironic service:
- Make sure the IP address pool is not colliding with the Oc_provisioning pool as configured in the deployment configuration file network_data.yaml
- For the provisioning network vlan, use the same ID you specified for the Controller OcProvisioning network (cloud deployment configuration files) and for the Bare Metal host PXE PKey ID configuration executed by NDO in previous DPU preparation steps (ID "70").
- Map the network to the "ibnet" physical network (InfiniBand fabric)
Once provisioning network is created, the Controllers Nodes ports GUID are added to the PKey as members by the Fabric Management Node. Login to UFM WebUI and manually add as well the Fabric Management Node GUID to this provisioning network PKey.
This step is required for the Bare Metal PXE over InfiniBand deployment phase
Create a flavor with custom resources for Bare Metal instances:
- Notice the CUSTOM_BAREMETAL resource as its name is relevant to next steps
- Use physical resources set to "0" as demonstrated below to avoid scheduling based on standard properties for VM instances
- Collect the GUID of the Bare Metal servers IB Adapter Port connected to the IB fabric . There are several ways to get the InfiniBand Adapter GUID, by looking at the Adapter sticker or by booting the server while its configured for PXE boot and checking its console screen
Prepare a baremetal nodes inventory file named overcloud-nodes-ib-bm-centos8.yaml with the details for the Bare Metal Tenant servers
- Include the host InfiniBand Adapter GUID collected in previous steps for each server as "client-id" parameter with a prefix of "20:<GUID>"
- The ports "address" parameter should match the GUID without "03:00"
- Update the ipmi credentials per server.
- Use a resource class named "baremetal" which corresponds to the CUSTOM_BAREMETAL flavor resource used in previous steps.
- Use physical network "ibnet" which is mapped to the InfiniBand fabric.
- This deployment yaml should be used for RHEL/CentOS 8 based deployments. For CentOS 7-based deployment use prefix: ff:00:00:00:00:00:02:00:00:02:c9:00:<GUID> as "client-id".
Import the inventory file and verify the nodes are listed:
Identify the Ironic customized deploy images you uploaded earlier to the image store and set it as the kernel/ramdisk images for the inventory nodes to be used during Bare Metal deployment
Clean the nodes and prepare it for Bare Metal tenant instance creation
During this phase the Bare Metal servers will be booted using ramdisk/kernel images and their local drive will be erased as preparation for the Guest OS deployment phase. The cleaning phase might take a while, you can follow the process over the server console screen.
Bare Metal Tenant Instance Provisioning
Verify the nodes are "available" for Bare Metal tenant instance deployment using tenant Guest image:
Create a tenant network and a subnet
- Upon creation of the tenant network Neutron will call UFM to create a tenant PKey matching the specified Vlan ID and add the Controller nodes ports GUID into it.
The vlan ID will be converted into a unique IB PKey (VLAN ID 101 → PKey ID 0x8065 in this case) and will be configured on the fabric by the Fabric Mgmt. Node (UFM) in order to provide tenant isolation.
Map the network to the "ibnet" physical network (InfiniBand fabric).
Spawn Bare Metal tenant instances over the tenant network with the Guest image you uploaded previously to the image store
- During this phase the Bare Metal servers will be booted twice, one time using ramdisk image and the second time using Guest OS image on the server local drive. You can follow the process over the server console screen.
- During the Guest OS deployment phase Neutron will call UFM to add the Bare Metal server port GUID into the newly created tenant Pkey in order to allow the tenant server to fetch an IP from the Controller using DHCP over InfiniBand.
Verify the Bare Metal tenant instances are up and Active:
Log into the UFM WebUI and verify a tenant PKey was provisioned automatically per the created tenant network and that relevant GUIDs were added as members.
As seen below VLAN ID 101 was mapped to PKey ID 0x8065 and the Bare Metal tenant servers port GUID was added to the PKey as member.
External Access to Bare Metal Instance using vRouter and Floating IP
Create an external Ethernet provider network with a gateway leading to the public network.
Create a vRouter and attach to it both the external and the previously created IPoIB tenant networks, in order to allow the Bare Metal instances on the tenant network external connectivity
Create a Floating IP on the external network and attach it to the Bare Metal instance in order to allow an external access into it
Connect to the Bare Metal tenant instance Floating IP from a machine located on the external network:
Verify internet connectivity from the instance:
Infrastructure Bandwidth Validation
GPUDirect RDMA provides direct communication between NVIDIA GPUs in remote systems.
It eliminates the system CPUs and the required buffer copies of data via the system memory, resulting in significant performance boost.
GPUDirect-enabled Bandwidth Test Topology
IB_WRITE_BW Test over 200Gb/s InfiniBand Fabric
- Some of the configuration applied in this section are not persistent and have to be re-applied after server reboot
- Create a custom CentOS 8 Stream Guest OS cloud image with NVIDIA GPU CUDA Drivers, NVIDIA Network Drivers, and GPUDirect benchmark tools as described in this article How-to: Create OpenStack Cloud Image with NVIDIA GPU and Network Drivers The following DIB elements were used to build the image used for this test:
- Upload the custom guest image and create two Bare Metal tenant instances as instructed in previous sections.
Login to both Bare Metal instances and load nvidia-peermem module:
Identify the relevant Network/RDMA device to use during the test and notice its NUMA node. For our test it would be ConnectX6 device ib2 / mlx5_4 which is connected to the InfiniBand fabric and located on NUMA node 1.
Increase the Adapter maximum accumulated read requests and reboot the server:
- Use the relevant MST device ID identified in previous step
- The value of 44 max requests we used is a best practice value for 200Gb/s test over a server with PCIe Gen4 CPU as the one we used.
- In some cases it is recommended to increase PCIe MaxReadReq size of the network device to 4KB using setpci command in order to further optimize the bandwidth test results
Identify the relevant GPU devices to use during the test and verify it is - in this case it is would be A100 GPU device. Use the commands below to verify the test devices topology allowing optimized performance bandwidth test:
- For optimized performance test verify Network/RDMA and GPU devices:
- Located on the same NUMA node
- Connected over PCIe bridges without traversing the PCIe Host Bridge and different NUMA nodes (PIX / PXB topologies)
- In the servers we used for this test the Network-RDMA device (mlx5_4) and GPU device (GPU1 - A100) are sharing NUMA1 and connected over PXB PCIe topology
- For optimized performance test verify Network/RDMA and GPU devices:
Enable GPU device persistence mode and lock GPU clock on maximum allowed speed
- Apply the following settings only when the bandwidth test result is not satisfying
- Do NOT set a value higher than allowed per specific GPU device
- "nvidia-smi -i <device id> -q -d clock" command can be used to identify the Max Allowed Clock of a device
- For the A100 device we used in this test the Max Allowed Clock is 1410 MHz
- Use the relevant GPU device ID (-i <device id>) identified in previous step to run the commands below on the required device
Start GPUDirect ib_write_bw server on one of the instances using the relevant Network/RDMA and GPU devices:
- GPU-enabled ib_write_bw is one of the tools installed on the guest image as part of the gpudirect-bench DIB element
- It is possible to run RDMA-based test without GPUDirect by omitting the "use_cuda" flag
- In some hardware topologies the nvidia-smi GPU device ID does not correlate with the ID used by the perftest tools, as in our case. ib_write_bw output specifies the GPU device that was picked - make sure its the required device.
Start GPUDirect ib_write_bw client on the second instance using the relevant Network and GPU devices and specify the IP of the remote instance:
This impressive bandwidth test result is demonstrated using 200Gb/s InfiniBand fabric with GPUDirect support. The servers used for this test support PCIe gen4 and optimized for GPUDirect.
Itai Levy Over the past few years, Itai Levy has worked as a Solutions Architect and member of the NVIDIA Networking “Solutions Labs” team. Itai designs and executes cutting-edge solutions around Cloud Computing, SDN, SDS and Security. His main areas of expertise include NVIDIA BlueField Data Processing Unit (DPU) solutions and accelerated OpenStack/K8s platforms.
Over the past few years, Itai Levy has worked as a Solutions Architect and member of the NVIDIA Networking “Solutions Labs” team. Itai designs and executes cutting-edge solutions around Cloud Computing, SDN, SDS and Security. His main areas of expertise include NVIDIA BlueField Data Processing Unit (DPU) solutions and accelerated OpenStack/K8s platforms.