Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Is Your Network Ready for AI Training? A Checklist

· 6 min read · Home Networking

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide helps you assess whether your network infrastructure can handle the unique demands of AI training traffic, such as large data transfers, distributed computing, and high-frequency synchronization. You'll learn what to check, what thresholds matter, and how to identify bottlenecks before they disrupt your training jobs.

What You'll Need

  • Access to your network switch/router configuration (or admin credentials)
  • Basic knowledge of your AI training workload (data size, model size, number of GPUs)
  • A tool to measure network throughput (e.g., iperf3, or a simple file transfer test)
  • Optional: a monitoring dashboard (Prometheus, Grafana, or your cloud provider's tools)

Step-by-Step

  1. Identify your training traffic patterns. AI training typically involves three types of traffic: (a) large bulk data transfers (loading datasets, saving checkpoints), (b) frequent small messages (gradient synchronization in distributed training), and (c) occasional large model updates. Write down which types apply to your setup.
  2. Measure your current network throughput. Use iperf3 between two servers that will participate in training. Run at least three tests with different TCP window sizes and parallel streams (e.g., -P 4, -P 8). Record the maximum aggregate throughput you can achieve. This is your practical ceiling.
  3. Compare throughput to your data transfer requirements. Estimate how long it takes to move your training dataset from storage to compute nodes. For example, if you have 1 TB of data and your network gives 10 Gbps, that's ~800 seconds (13+ minutes). If that's too slow for your workflow, you need a faster network or a different data staging strategy.
  4. Check latency and jitter. Run ping between your compute nodes. For distributed training with frequent synchronization (e.g., using NCCL or Horovod), latency of under 1 ms is ideal; anything above 2 ms can noticeably slow down gradient updates. Also check jitter (variation in latency) – high jitter causes stragglers.
  5. Verify switch buffer capacity. AI training often involves bursty traffic. Check your switch's buffer size (usually in MB per port or per ASIC). For lossless Ethernet (RoCEv2) or InfiniBand, adequate buffering prevents packet drops, which would otherwise trigger retransmissions and kill performance.
  6. Enable flow control or use RDMA if applicable. If your GPUs support RDMA (Remote Direct Memory Access) and your network supports RoCEv2 or InfiniBand, make sure it's enabled and configured correctly. This bypasses the CPU and drastically reduces latency and CPU overhead.
  7. Test for congestion collapse. Run a training job with a small batch size and monitor network utilization. If you see throughput drop significantly when multiple nodes communicate simultaneously, you may have a congestion problem. Use tools like nvidia-smi (with NCCL) or ethtool -S to check for packet drops.
  8. Check for oversubscription. If your network uses a leaf-spine topology, verify the oversubscription ratio. For AI training, a 1:1 ratio (no oversubscription) is recommended. If you have 4:1 oversubscription, expect performance degradation when many nodes talk at once.
  9. Monitor during a real training run. Start a small training job and watch network metrics (throughput, packet drops, retransmissions) using your monitoring tools. Look for any red flags: high retransmission rate (>0.1%), high latency spikes, or low utilization on some links.
  10. Evaluate storage network. AI training often reads data from shared storage (NAS or object store). Ensure the storage network isn't a bottleneck. Run a parallel read test (e.g., using dd with multiple processes) to see if you can saturate the network link to storage.

Common Mistakes

  • Assuming 10GbE is enough. 10 Gbps might be fine for small models, but for large-scale training (e.g., GPT-3 scale), 25/40/100 Gbps or InfiniBand is often required.
  • Ignoring packet drops. Even a 0.1% drop rate can halve throughput due to TCP retransmissions. Always check for drops.
  • Using default TCP settings. Default TCP window sizes may be too small for high-bandwidth, high-latency links. Tune net.core.rmem_max and wmem_max for your environment.
  • Forgetting about the storage side. A fast network is useless if your storage can't deliver data quickly. Ensure your storage system can sustain the required read throughput.
  • Not testing with realistic traffic. Synthetic tests like iperf3 don't always reflect real training patterns. Always validate with an actual training job.

Tips

  • Use jumbo frames (MTU 9000) if supported. This reduces overhead and improves throughput for large data transfers.
  • Enable QoS for training traffic. Prioritize RDMA or synchronization traffic to avoid delays from other network activity.
  • Consider network topology. A non-blocking fat-tree topology is ideal. Avoid daisy-chaining switches.
  • Keep firmware up to date. Switch and NIC firmware updates often include performance improvements and bug fixes.
  • Use network monitoring tools. Tools like nload, bmon, or full-fledged solutions like Grafana can help you spot issues early.

Troubleshooting

  • If throughput is lower than expected: Check for packet drops (ethtool -S eth0 | grep drop). If drops are high, increase buffer sizes or reduce the number of parallel streams. Also check if you're hitting a CPU bottleneck (use top to see if CPU is at 100%).
  • If latency is high: Use traceroute to see the path. If there are many hops, consider a more direct connection. Also check if the network is congested – look at switch port utilization.
  • If training stalls: Check for network timeouts. Sometimes firewalls or load balancers interfere with long-lived connections. Try disabling TCP offload features (ethtool -K eth0 tso off gso off) and see if that helps.
  • If only some nodes are slow: Verify that all nodes have the same NIC speed and are connected to the same switch (or equally capable switches). Check for faulty cables or ports.
  • If RDMA isn't working: Ensure the NIC firmware supports it, and that the switch is configured for RoCEv2 (e.g., PFC enabled). Test with ib_write_bw if using InfiniBand.

Frequently Asked Questions

What is the minimum network speed for AI training?

For small models (e.g., ResNet-50 on a single GPU), 1 Gbps is enough. For distributed training across multiple GPUs, 10 Gbps is a practical minimum. For large-scale training (e.g., GPT-3), 100 Gbps or InfiniBand is recommended.

Is InfiniBand necessary for AI training?

Not strictly, but it's preferred for large-scale distributed training due to its low latency and high throughput. For small clusters (2-4 nodes), a well-configured 25/40 Gbps Ethernet with RDMA can work well.

How do I check if my network is the bottleneck?

Monitor GPU utilization during training. If GPUs are idle while waiting for data, the network (or storage) is likely the bottleneck. Use tools like nvidia-smi and nload to correlate.

What is oversubscription and why does it matter?

Oversubscription is when the total bandwidth of downstream ports exceeds the upstream bandwidth. A 4:1 oversubscription means 4 servers share 1 server's worth of bandwidth, which can cause congestion during bursts.

Should I use TCP or RDMA?

RDMA (e.g., RoCEv2) is faster and uses less CPU, but requires compatible hardware and configuration. TCP is more universal and easier to set up, but may not saturate high-speed links.

How often should I re-evaluate my network readiness?

Whenever you change your training workload (e.g., larger models, more nodes) or upgrade your hardware. Also periodically, as network conditions can degrade over time.