keepcalculator

06 Numbers and Powers

Data Center Switch Checks for AI Workloads

Card No. 06·6763 · Updated · Standard formula, shown below

Before upgrading data center switches for AI workloads, you must verify fabric bandwidth, port speeds, buffer depth, and congestion control support, because AI training traffic is bursty, east-west heavy, and loss-sensitive in ways that general-purpose switching is not. This article walks through the specific checks that separate an AI-ready switch from one that will become a bottleneck. You will learn what to inspect in the hardware, the software, and the physical layer before you commit to a purchase.

Why AI Changes the Switch Requirements

Traditional data center traffic is mostly north-south (client to server) and relatively tolerant of occasional packet loss. AI training, especially distributed training of large models, is different. It uses a technique called collective communication, where hundreds or thousands of GPUs exchange gradients and activations many times per second. This creates a pattern of synchronized, bursty, east-west traffic that is extremely sensitive to latency and packet loss. A single dropped packet in a collective operation can cause the entire training job to stall while the cluster waits for retransmission. As a result, the switch fabric must provide high bisection bandwidth, deep buffers, and advanced congestion control mechanisms.

Bandwidth and Port Speed Checks

The first and most obvious check is whether the switch can handle the aggregate bandwidth your AI cluster will generate. Modern AI accelerators (GPUs, TPUs, custom ASICs) ship with 400G or even 800G network interfaces. If your switch only supports 100G or 200G ports, you will need multiple links per accelerator, which complicates the fabric and may not deliver the required throughput.

  • Port speed: Confirm the switch supports the same port speed as your accelerators’ NICs. For 400G, look for QSFP-DD or OSFP form factors. For 800G, OSFP is the current standard.
  • Fabric capacity: Check the switch’s switching capacity in bits per second. It should be at least equal to the sum of all port speeds, and ideally higher to allow for headroom.
  • Oversubscription ratio: In a spine-leaf topology, the ratio of downlink (leaf-to-server) to uplink (leaf-to-spine) bandwidth should be 1:1 for AI training. Any oversubscription will create a bottleneck during collective operations.

Buffer Depth and Packet Drop Behavior

AI traffic is bursty. During a gradient synchronization step, all GPUs send data simultaneously, creating microbursts that can overflow shallow switch buffers. If the switch drops packets, TCP (or RoCEv2) must retransmit, adding latency and potentially causing the training job to stall.

Check the switch’s buffer size per port or per ASIC. For AI workloads, a common recommendation is at least 8 MB to 16 MB of buffer per 400G port. Also, verify that the switch supports dynamic buffer allocation, which allows the ASIC to allocate more buffer to congested ports on demand. Some switches also support packet spraying (like NVIDIA’s adaptive routing or Intel’s adaptive routing) which helps spread traffic across multiple paths and reduces the chance of a single link being overwhelmed.

Congestion Control and RoCEv2 Support

Most AI clusters use RDMA over Converged Ethernet (RoCEv2) to achieve low latency and high throughput. RoCEv2 is lossless Ethernet, which means it relies on the switch to provide Priority Flow Control (PFC) and Explicit Congestion Notification (ECN) to avoid packet drops. Without proper congestion control, RoCEv2 traffic can suffer from head-of-line blocking and severe performance degradation.

  • PFC: Ensure the switch supports 802.1Qbb (Priority Flow Control) and can configure multiple lossless classes.
  • ECN: Check for 802.1Qau (ECN) support, which marks packets instead of dropping them, allowing the sender to slow down.
  • DCQCN or equivalent: The switch should work with the congestion control algorithm used by the NICs (e.g., DCQCN for RoCEv2). Some vendors have proprietary algorithms, so verify compatibility with your NICs.

Software and Network Operating System Features

The hardware is only half the story. The network operating system (NOS) must support the features that make AI fabrics work. Check the following software capabilities:

  • ECMP and load balancing: Equal-Cost Multi-Path routing is essential to spread traffic across multiple spine switches. Some switches support dynamic load balancing (e.g., per-packet or flowlet-based) which improves utilization.
  • Telemetry: Real-time telemetry (like INT – In-band Network Telemetry) helps you monitor congestion and troubleshoot issues. This is critical for AI workloads because problems can appear and disappear in milliseconds.
  • Automation: The NOS should support infrastructure-as-code tools (Ansible, Terraform, etc.) so you can provision the fabric consistently and quickly. AI clusters change often, and manual configuration is error-prone.
  • RoCEv2 configuration: The NOS must allow fine-grained configuration of PFC, ECN, and buffer thresholds. Some switches have predefined profiles for AI, which simplify the setup.

Physical Layer and Cabling

Don’t overlook the physical layer. The cabling and optics must match the switch ports and the distances involved. For 400G, you have options like DR4 (500m) or FR4 (2km) for single-mode fiber. For 800G, OSFP ports can use similar optics. Check that your existing fiber plant supports the required reach and that the connectors are compatible (e.g., MPO vs. LC). Also, consider power and cooling: AI switches consume more power and generate more heat than typical switches. Verify your rack power budget and cooling capacity before installation.

Cost and Vendor Lock-in Considerations

AI-ready switches are significantly more expensive than general-purpose ones. A 400G switch can cost several times more than a 100G switch with the same number of ports. But the cost is not just the hardware. You must also consider the cost of optics, cabling, and the NOS license. Some vendors bundle the NOS with the hardware, while others charge separately. Also, think about vendor lock-in: if you choose a proprietary fabric (like NVIDIA’s InfiniBand or a proprietary Ethernet mode), you may be locked into that vendor’s roadmap. Open standards like Ethernet with RoCEv2 offer more flexibility, but require more tuning.

Frequently Asked Questions

What is the difference between InfiniBand and Ethernet for AI?

InfiniBand offers lower latency and higher reliability with built-in lossless flow control, but it is proprietary and typically more expensive. Ethernet with RoCEv2 can achieve similar performance but requires careful configuration of PFC and ECN. For large clusters, InfiniBand is often chosen for its performance, but Ethernet is gaining ground due to its lower cost and familiarity.

How much buffer memory do I need per port?

For 400G ports, a common recommendation is at least 8 MB to 16 MB per port. However, the total buffer on the switch is shared among ports, so a switch with 32 ports and 256 MB of buffer would have 8 MB per port if evenly allocated. Dynamic allocation can help, but the total must be sufficient for the burst size.

Can I use my existing 100G switches for AI?

Yes, but you will need to connect each accelerator with multiple 100G links (e.g., 4 links for 400G). This increases the number of ports and cabling, and may not provide the same performance as a single 400G link due to load-balancing limitations. It is possible for small clusters, but for large-scale training, a dedicated AI fabric is recommended.

What is the role of telemetry in AI networks?

Telemetry provides real-time visibility into network congestion, queue depths, and packet drops. In AI workloads, where a microburst can cause a training stall, telemetry helps you identify the exact switch and port where the problem occurs. This is essential for tuning congestion control parameters and troubleshooting.

Do I need to upgrade my NICs as well?

Yes, the switch and the NIC must support the same speeds and features. If you upgrade to 400G switches, your NICs must also be 400G and support RoCEv2 with the same congestion control algorithm. Otherwise, the link will negotiate to the lower speed, and you won’t get the benefits.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →