Overview
ZStack Cloud supports the use of smart NICs (Mellanox CX-5 and Mellanox CX-6 are currently supported) and applies the offload feature of the smart NIC to implement network policies within the smart NIC, thereby releasing precious CPU computing capabilities for applications and further improving the network performance. A smart NIC can be virtualized into several vDPA NICs. These vDPA NICs are directly allocated to VM instances, endowing them with I/O performances comparable to those of physical NICs.
Functional Principle
On the data plane, smart NICs realize their pass-through to VM instances and data plane accelerations through the software vDPA solution. On the control plane, network policies are directly distributed to smart NICs. Some flows are directly forwarded to vDPA NICs (fast path) and some flows are forwarded through OVS-DPDK vSwithes (slow path).
Advantages
- A smart NIC can be virtualized into several vDPA NICs. vDPA NICs are directly passed-through to VM instances without a data plane interlayer, thus improving the network performance.
- vDPA NICs abide by virtio standards and do not depend on any hardware vendors.
- You can configure Bond for multiple vDPA NICs to improve the network high-availability.
- You can hot migrate a VM instance with its vDPA NICs. This action is not limited by NIC vendors or driver versions.
Scenarios
- Scenarios with High Compute Performance
In high-compute-performance scenarios like super computing centers, weather forecasts, and gene sequencing, servers are required to reach a compute speed of trillions of times per second. The higher compute performance brings heavier pressures on the network performance. Smart NICs can ensure low latencies for scenarios with such high compute performance.
- Distributed Storage
In a distributed storage system, data is distributively stored on several storage devices to realize read/write accelerations and redundant backups. The higher storage performance brings heavier pressures on the network performance. Smart NICs can ensure high throughput in distributed storage systems.
- Distributed AI Training
In the Artificial Intelligence (AI) filed, distributed nodes are used for AI trainings to achieve a higher deep compute capability. The higher compute and storage performance and surging pressure on AI trainings require a balance between the throughput and latency. Smart NICs ensures the scaling efficiency in distributed AI trainings by improving the throughput as well as reducing the latency.
Instructions
- Supported smart NIC types: Mellanox CX-5 (PCI ID:15b31017) and Mellanox CX-6 (PCI ID: 15b3101d).
- If you install smart NICs on servers, make sure that the smart NICs of the same type are installed on the same PCIe slots of each server.
- After you install smart NICs, you need to restart the server and enable SR-IOV Support and Intel VT-d / AMD IOMMU Support in BIOS before you can use the smart NICs.
- Currently, this feature applies to new users whose Clouds are deployed based on a h76c ZStack Cloud ISO.
- To use smart NICs, make sure that your cluster satisfy the following
requirements:
- The cluster is newly created and enabled with Network Acceleration Support.
- All hosts in the cluster are installed with Mellanox CX-5 or Mellanox CX-6 smart NICs.
- The L2 network associated with the cluster uses an OVS-DPDK vSwitch.
- Make sure that all hosts in the associated cluster have sufficient memory.
- A VM instance configured with a vDPA NIC can use VPC networks (of the IPv4 type) and corresponding network services (except security groups, port mirroring, multicast routing, and User Data).
Scenario Practice
About this task
Scenario Assumption: You want to use Mellanox CX-5 smart NICs to improve the network performance of business VM instances for business requirements.
- Two x86 servers, one gigabit switch, one 10-gigabit switch, and several category five cables.
- Each x86 server is installed with a Mellanox CX-5 smart NIC.
- Following files:
- A latest ZStack Cloud custom ISO (h76c).
- A latest ZStack Cloud installation package.
- Latest Multi-mn HA suites.
- A ZStack Cloud license (Enterprise Prepaid).
- A latest ZStack Cloud VPC vRouter Image (KVM).
- Management Network
Node Gigabit Network Interface 1 Gigabit Network Interface 2 Aggregate Network Interface Network Bridge IP Address Netmask Gateway Management Node1 eth0 eth1 bond0 br_bond0 172.25.15.143 255.255.255.0 172.25.0.1 Management Node2 eth0 eth1 bond0 br_bond0 172.25.15.99 255.255.255.0 172.25.0.1 - Business Network
Node 10-Gigabit Network Interface 1 10-Gigabit Network Interface 2 IP Address Netmask Gateway Management Node1 enp179s0f0 enp179s0f1 - - - Management Node2 enp179s0f0 enp179s0f1 - - -

- Management Network
Management Network Configuration NIC bond0 VLAN ID NoVLAN IP Range 172.25.15.50~172.25.15.150 Netmask 255.255.255.0 Gateway 172.25.0.1 - VPC Network
VPC Network1 Configuration NIC bond0 VLAN ID 2200 CIDR 192.167.0.1/24 Gateway 192.167.0.1 DHCP IP Randomly Allocated VPC Network2 Configuration NIC enp179s0f1 VLAN ID 2334 CIDR 192.169.0.1/24 Gateway 192.169.0.1 DHCP IP Randomly Allocated

- Energize and connect hardware.
- Install operating systems.
- Configure the management network.
- Install HA suites.
- Install the license.
- Create a cluster with Network Acceleration Support enabled.
- Add the two management nodes to the cluster.
- Virtualize the physical NIC.
- Create two L2 network whose Network Acceleration Mode are respectively Smart NIC and Standard. Attach the two L2 networks to the cluster.
- Create a VPC vRouter and two VPC networks.
- Create two business VM instance and attach the two VPC networks to each VM instance.
- Compare the VM vNIC performance with the vDPA NIC performance.
Procedure
-
Energize and connect hardware.
Check your hardware devices. Configure servers and network devices according to Figure 1.
-
Install operating systems.
Install operating system for the two servers according to following steps:
-
Configure the management network.
Run following commands on the two management nodes in turn to configure the management network according to the table Table 1 in turn.
# Take management node1 as an example. # Create the aggregate NIC bond0 [root@localhost ~]# zs-bond-lacp -c bond0 # Attach the two gigabit network interfaces, eth0 and eth1, of the management node1 to bond0. [root@localhost ~]# zs-nic-to-bond -a bond0 eth0 [root@localhost ~]# zs-nic-to-bond -a bond0 eth1 # After finishing the link aggregation configurations, configure the LACP aggregation on the corresponding vSwitch network interfaces. # Create the network bridge br_bond0 and set the IP address, netmask, and gateway of the management node1. [root@localhost ~]# zs-network-setting -b bond0 172.25.15.143 255.255.255.0 172.25.0.1 # Check whether the aggregate port bond0 is created successfully. [root@localhost ~]# zs-show-network -
Install HA suites.
Install HA suites on either of the two management nodes to realize Multi-MN HA.
Take management node1 as an example.
- Import HA suites to management node1 and unzip the files.
- Install HA suites on management node1.
- Use the VIP to access the UI of management node1 and finish the Cloud initialization.
- Switch the primary and secondary management nodes. Use the VIP to access the UI of management node2 and finish the Cloud initialization.
-
Install the license.
Use the VIP to access the UI of either management node. Upload the Multi-MN license you prepared.
-
Create a cluster with Network Acceleration Support
enabled.
Use the VIP to access the UI of management node1. On the main menu of ZStack Cloud, choose . On the Cluster page, click Create Cluster. Then, the Create Cluster page is displayed.
On the displayed page, set the following parameters:- Zone: The current zone is displayed.
- Name: Enter a name for the cluster.
- Description: Optional. Enter a description for the cluster.
- Hypervisor: Choose KVM.
- CPU Architecture: Choose x86_64.
- Network Acceleration
Support: Optional. Default: disabled. In this
practice, enable this feature.
Note: You can enable Network
Acceleration Support for a cluster only when you create the
cluster. - Network
Configuration:
- VDI Network: Optional. Leave it as blank in this practice.
- Migration Network: Optional. Leave it as blank in this prectice.
- Advanced:
- VM CPU Model: Optional. Use the default setting in this practice.
- Host CPU Model: Optional. Use the default setting in this practice.
Figure 3. Create Cluster 
-
Add the two management nodes to the cluster.
On the main menu of ZStack Cloud, choose . On the Host page, click Add Host. Then, the Add Host page is displayed. Choose Manual Addition on the displayed page.
Take management node1 as an example. Set the following parameters:- Name: Enter a name for the host.
- Description: Optional. Enter a description for the host.
- Virtualization Technology: Choose KVM.
- Tag: Optional. Do not set this parameter in this practice.
- Cluster: Choose the cluster you created with Network Acceleration enabled.
- Host Info: Choose
IP Address as
the addition method.
- IP Address: Enter the host IP. In this practice, enter the IP address of management node1: 172.25.15.143.
- SSH Port: Enter the host port. Default: 22.
- User Name: Enter the host user name. Default: root.
- Password: Enter the password corresponding to the user name.
- Scan Host
IOMMU Setting: Optional. Default: disabled. In this
practice, enable this feature.
Note: The
setting takes effect after you restart the host. - Intel EPT Hardware Assist: Optional. Default: enabled.
- Add Another Host: Select this checkbox to add management node2.
Figure 4. Add Management Node1 
-
Virtualize the physical NIC.
On the details page of the host, choose , locate a Mellanox CX-5 smart NIC and click SR-IOV on its action list to virtualized the smart NIC into VF NICs of the specified number.
-
Create two L2 network whose Network Acceleration Mode are
respectively Smart NIC and Standard. Attach the two L2 networks to the
cluster.
-
Create a VPC vRouter and two VPC networks.
-
Create two VM instances. Attach each one with the two VPC
networks you created before.
On the main menu of ZStack Cloud, choose . On the VM Instance page, click Create VM Instance. Then, the Create VM Instance page is displayed. Choose Fast Creation.
On the displayed page, set the following parameters:- Name: Enter a name for the VM instance.
- Quantity: Enter 2 in this practice.
- Tag: Optional. Do not set tags for the VM instance in this practice.
- Offering: Choose
Basic
Offering.
- Instance Offering: Choose an instance offering.
- Image: Choose an image.
- Data Volume: Optional. No data volume is attached by default.
- Network
Configuration:
- Network: Attach the VPC network1 and VPC network2 to the VM instance.
- Make Default: Make the VPC network2 as the default network.
- Enable SR-IOV: Optional. Disable SR-IOV in this practice.
- Assign IP: Optional. The checkbox is not selected by default. The IP is randomly allocated by DHCP.
- MAC Address: Optional. The checkbox is not selected by default. The MAC is randomly allocated by DHCP.
- Security Group: Optional. Do not set security groups in this practice.
- EIP: Optional. Do not set EIPs in this practice.
- User Data: Optional. Do not set User Data in this practice.
Figure 10. Create VM Instance 

-
Compare the VM vNIC performance with the vDPA NIC
performance.
In this practice, use an iperf3 tool to test the network performance of the two VM instances. Compare the vNIC performance and vDPA NIC performance from 3 aspects: bandwidth, packet loss rate, and throughput.
What to do next
Now, you have successfully put NICs into use.











