Environment variables
The following environment variables are automatically set on all nodes in an Instant Cluster:
Each node receives a static IP address (
NODE_ADDR) on the overlay network. When a cluster is deployed, the system designates one node as the primary node by setting the PRIMARY_ADDR and PRIMARY_PORT environment variables. This simplifies working with multiprocessing libraries that require a primary node.
The following variables are equivalent:
MASTER_ADDRandPRIMARY_ADDRMASTER_PORTandPRIMARY_PORT
MASTER_* variables are available to provide compatibility with tools that expect these legacy names.
Network interfaces
Instant Clusters use dedicated high-bandwidth network interfaces for inter-node communication, separate from the management interface used for external traffic.
Instant Clusters support up to 8 high-bandwidth interfaces per node. The
PRIMARY_ADDR environment variable corresponds to ens1, which enables launching and bootstrapping distributed processes.
NCCL configuration
NCCL (NVIDIA Collective Communications Library) handles GPU-to-GPU communication in distributed training. You must configure NCCL to use the internal network interfaces.Required configuration
Set theNCCL_SOCKET_IFNAME environment variable to use the internal network:
NCCL_SOCKET_IFNAME uses all available interfaces. However, explicitly setting it to ens1 ensures NCCL uses the high-bandwidth internal network.
Debugging NCCL
To troubleshoot multi-node communication issues, enable NCCL debug logging:Troubleshooting
Connection timeouts during distributed training
Symptom: Training jobs fail with connection timeout errors between nodes. Cause: NCCL is attempting to communicate over the external network interface (eth0) instead of the internal interfaces (ens1-ens8).
Solution: Set the NCCL_SOCKET_IFNAME environment variable:
Nodes cannot find the primary node
Symptom: Worker nodes fail to connect to the primary node during initialization. Cause: ThePRIMARY_ADDR or MASTER_ADDR environment variable is not being used correctly in your distributed training script.
Solution: Verify your script uses the PRIMARY_ADDR environment variable for the rendezvous address. For PyTorch distributed training:
Inconsistent training performance
Symptom: Training speed varies significantly between runs or degrades over time. Cause: Network congestion or suboptimal NCCL configuration. Solution:- Ensure all nodes are in the same data center (Runpod handles this automatically).
- Enable NCCL debugging to identify bottlenecks:
export NCCL_DEBUG=INFO - Verify your batch sizes are appropriate for the cluster size to maintain efficient GPU utilization.