Expand description
NCCL Network Priority via eBPF/tc
When the scheduler detects NcclCollective phase, this module uses Linux traffic control (tc) with eBPF classifiers to give NCCL traffic absolute priority on network interfaces.
This reduces all-reduce tail latency which is the critical path in distributed training โ the slowest rank determines throughput.
Constantsยง
- DEFAULT_
INTERFACES ๐ - Network interface to apply NCCL priority rules to.
- NCCL_
DSCP ๐ - DSCP marking for high-priority NCCL traffic.
- NCCL_
PORT_ ๐END - NCCL_
PORT_ ๐START - NCCL uses a specific port range (typically 29500-29999 for PyTorch).
Functionsยง
- detect_
nccl_ interface - Detect the primary network interface for NCCL traffic.
- disable_
nccl_ priority - Remove NCCL priority rules.
- enable_
nccl_ priority - Apply high-priority tc rules for NCCL traffic. Requires root / CAP_NET_ADMIN.
- mark_
nccl_ dscp - Mark outgoing NCCL packets with DSCP EF for switches/routers.