Clarification on optimal use of interconnect ports

I was wondering if someone could clarify the point on whether it’s necessary to use both ports to connect 2 or more sparks together (via switch for 4 nodes) to get the most out of the networking stack?

I’ve read conflicting comments. Some people mention that to hit the 200gbps you need to use both ports. Other people say one is enough and there isn’t much benefit to the second.

What is the optimal set up?

Jumping ahead a bit, but if two 200gbps cables were connected to a switch for each node in 4-node cluster, does the software (spark-vllm-docker etc) correctly handle this? Both in terms of understanding the topology and for splitting network traffic optimally across the 2 interfaces?

A single port is needed from each node to the switch to hit 200gbps, just make sure you configure IP addresses on both the virtual interfaces for it to work.

If you used a second port you could in theory reach the full 256gbps available on the PCIe bus towards the ConnectX NIC.

I’m not aware of anyone doing the dual cable setup due to the minimal gain for added complexity.

Using both ports doesn’t really yield any performance

Yeah whomever was saying you need both ports is wrong.

Each port has access to the same 2x PCIe 5.0 x4 partitions. As @mashie mentioned, the theoretical max throughput on a PCIe 5.0 x4 partition is 128Gbps (so theoretical max throughput on 2x x4 partitions == 256 Gbps). That being said, you will never get that in practice for many reasons. So basically, use a single 200Gbps (QSFP56) cable. The only practical reason to use 2 cables is if you’re doing it for reliability/failover reasons. In practice, you’ll gain nothing except buying another expensive, inflexible cable.

More accurate sources than whomever said you need 2x cables:

Thanks both for your answers - makes sense :)

Apparently it is possible to make use of both interfaces with environment variables such as the following:

```

export NCCL_IB_HCA=mlx5_0,mlx5_1 # Enable multi-stream network interfaces (tells NCCL it has 2 paths)

export NCCL_NET_SHARED_BUFFERS=1 # Tell NCCL to run 2 channels parallel across the fabric

export NCCL_MIN_NCHANNELS=2

export NCCL_MAX_NCHANNELS=2 # (Optional) If running over RoCE/Ethernet instead of native IB export NCCL_IB_GID_INDEX=3

```

Does anyone know if this actually works? Tempted to give a go, but not sure I want to expend the money if it’s a waste of time. I’m new to the ecosystem so not sure exactly what the limitations are. Is NCCL correctly set up for this on DGX spark?

By default you have two paths with a single cable, which is why you need to configure two IPs.

If both physical ports were in use would this double to 4?

Yes, then you need to allocated IPs to all four virtual interfaces.

On the DGX Spark it’s very easy to understand the CX7 connectivity. Use one port/cage only and the throughput is 200Gbps. Use both ports and the bandwidth is halved, with each port at 100Gbps.