Abstract
As the scale of distributed training grows, communication becomes a bottleneck. To accelerate the communication, recent works introduce In-Network Aggregation (INA), which moves the gradients summation into network middle-boxes, e.g., programmable switches to reduce the traffic volume. However, switch memory is scarce compared to the volume of gradients transmitted in distributed training. Although literature applies methods like pool-based streaming or dynamic sharing to tackle the mismatch, switch memory is still a potential performance bottleneck. Furthermore, we observe the under-utilization of switch memory due to the synchronization requirement for aggregator deallocation in recent works. To improve the switch memory utilization, we propose ESA, an Efficient Switch Memory Scheduler for In-Network Aggregation. At its cores, ESA enforces the preemptive aggregator allocation primitive and introduces priority scheduling at the data-plane, which improves the switch memory utilization and average job completion time (JCT). Experiments show that ESA can improve the average JCT by up to 1.35×.
1. Introduction: The Switch Memory Bottleneck
In distributed machine learning, In-Network Aggregation (INA) has emerged as a powerful technique to mitigate communication overhead. By performing gradient summation directly within programmable switches, INA significantly reduces the volume of traffic reaching the Parameter Servers (PS). However, a fundamental "memory wall" exists: while modern deep learning models can be gigabytes in size, high-speed programmable switches (like the Intel Tofino) typically possess only about 10MB of SRAM per pipeline.
Existing INA systems often suffer from low memory utilization because they rely on rigid allocation schemes. If a single worker in a training job is slow (a "straggler"), the switch memory allocated to that job remains occupied but idle, blocking other jobs from utilizing the scarce resource. This synchronization requirement leads to severe under-utilization and increased Job Completion Times (JCT).
2. ESA: Preemptive Memory Scheduling
To address these inefficiencies, we propose ESA (Efficient Switch Memory Scheduler). ESA shifts the paradigm of switch memory management from static allocation to a dynamic, cache-like model.
2.1 Data-Plane Preemptive Allocation
The core innovation of ESA is the introduction of preemptive aggregator allocation. Instead of locking memory for the duration of a job, ESA allows high-priority gradient packets to "evict" lower-priority tasks currently residing in the switch memory. This ensures that the switch is always processing the most critical data.
2.2 Packet Swapping and Fallback Mechanism
Implementing preemption in hardware is challenging due to the strict processing limits of Reconfigurable Match-action Table (RMT) architectures. ESA overcomes this using a packet swapping technique. When a task is evicted, the switch swaps the partial sum in its memory with the incoming packet's data. The evicted partial sum is then forwarded to a host-based Parameter Server (PS) to complete the aggregation.
2.3 Priority-Aware Scheduling
ESA employs a co-designed priority scheduling policy that considers multiple factors:
- Intra-model priority: Gradients from the "front" layers of a model are prioritized as they are required first for the subsequent training iteration.
- Inter-job priority: Jobs with higher communication intensity or shorter remaining time to convergence are given precedence to minimize overall cluster JCT.
3. Evaluation
We evaluated ESA using a physical testbed with 10 GPUs and large-scale simulations based on Microsoft cluster traces. The workloads included training ResNet50 and VGG16 models on the Cifar100 dataset.
3.1 Performance Gains
- Training Speedup: In the physical testbed, ESA outperformed BytePS by up to 1.27× and ATP (a state-of-the-art INA system) by 1.15×.
- Scalability: In 64-node simulations, ESA achieved up to a 1.89× improvement in average JCT over SwitchML and 1.35× over ATP.
- Resource Efficiency: ESA improved switch memory utilization by up to 2.27× compared to non-preemptive baselines.
4. Conclusion
ESA demonstrates that treating switch memory as a dynamic cache rather than a static resource significantly enhances the efficiency of distributed training. By offloading the complexity of preemption to a hardware-friendly swapping mechanism and a robust host-based fallback, ESA effectively bypasses the switch memory bottleneck. Future work will focus on refining priority estimation in highly dynamic environments and porting the ESA logic to a wider variety of programmable network hardware.
Summary updated