QCluster: Clustering Packets for Flow Scheduling

Tong Yang, Jizhou Li, Yikai Zhao, Kaicheng Yang, Hao Wang, Jie Jiang, Yinda Zhang, Nicholas Zhang · DOI · OpenReview

TL;DR

This paper introduces QCluster, a novel framework that adapts existing flow scheduling algorithms for commodity switches with limited queues. By clustering packets with similar characteristics, QCluster significantly improves flow completion times and adapts to dynamic network conditions without prior traffic measurement.

What Problem Does This Paper Address?

In modern data centers, efficient flow scheduling is paramount for delivering a good user experience. Different scheduling algorithms (like SRPT, LAS, Fair Queueing, and Deadline-Aware) aim to optimize metrics such as flow completion time, fairness, or meeting deadlines. However, implementing these sophisticated algorithms on commodity network switches is challenging due to their limited number of queues. Traditionally, this has required static parameter tuning based on advance traffic measurements. The problem is that network traffic is highly dynamic, and these static parameters quickly become suboptimal, leading to degraded performance. This paper tackles the challenge of adapting these scheduling policies to limited-queue environments in a dynamic, measurement-free manner.

Methods

The core innovation is the QCluster framework, which frames the problem of adapting scheduling policies to limited queues as a packet clustering problem. The key idea is to group packets with similar "weights" or "properties" into the same queue.

  • Packet Weight and Properties: QCluster uses packet weight (defined differently for each scheduling policy, e.g., bytes sent for LAS) and other properties (like deadlines) as features for clustering.
  • Scheduling Count-Min Sketch (SCM): To efficiently track necessary information (like packet weight, arrival time, and last queue ID) within the limited memory of switches, an enhanced Count-Min sketch is proposed. This SCM sketch can automatically age out old flow information and distinguish between messages and flowlets.
  • Queue Weight Management: QCluster maintains an average "queue weight" for each of the k available queues. When a new packet arrives, its weight is compared to these queue weights to determine the best queue.
  • Queue Selection Strategy: The decision of which queue to assign a packet to considers not just the closest queue weight but also cluster size and the need to avoid packet disorder. Two strategies are proposed: Same-Cluster-Size (for Fair Queueing) and Proportional-Cluster-Size (for LAS, SRPT, Deadline-Aware).
  • Packet Disorder Avoidance (PDA): A crucial component is the PDA algorithm, which prevents packet disorder. It leverages the SCM sketch to track the previous packet's location and applies specific rules based on the scheduling policy to ensure packets from the same flow maintain their order. For example, in LAS/SRPT/Deadline-Aware, a packet cannot be placed in a higher-priority queue than its predecessor within a flowlet.

QCluster is designed to be generic, adaptable to various scheduling problems by defining packet weights and PDA rules accordingly.

Datasets

The paper uses several publicly available datasets that represent real-world data center traffic distributions. These include:

  • W1-W4: Datasets used in previous works like Homa.
  • W5 (Data Mining workload): Used in evaluations of DCTCP, pFabric, and PIAS.
  • W6 (Web Search workload): Also used in evaluations of DCTCP, pFabric, and PIAS.

These workloads are characterized by their cumulative distributions of message/flow sizes, providing a realistic basis for evaluating scheduling performance. The authors note that they consider flows smaller than 1KB as "small flows" and larger flows accordingly, with specific definitions for W6.

Key Insights and Ideas

  • Clustering as the Core Abstraction: The paper's central insight is reframing the challenge of adapting scheduling policies to limited queues as a clustering problem. This provides a unified approach to handle diverse scheduling goals.
  • Measurement-Free Adaptation: QCluster's ability to adapt to dynamic traffic without requiring explicit, advance traffic measurements is a significant advantage over prior methods that relied on static, pre-configured thresholds.
  • The Importance of Packet Disorder Avoidance: Packet disorder is a critical issue in data centers, and the proposed PDA algorithm is essential for making QCluster practical. Its policy-specific rules demonstrate a nuanced understanding of scheduling dynamics.
  • SCM Sketch for Efficient State Management: The SCM sketch is a clever solution for managing flow state within the tight memory constraints of programmable switches, enabling the real-time clustering decisions.
  • Generic Framework Power: The ability to apply QCluster to SRPT, LAS, Fair Queueing, and Deadline-Aware scheduling with minimal modifications highlights the power and flexibility of the proposed framework.

Key Results

  • High Clustering Speed: QCluster can cluster packets at a remarkable speed of 3.2 Tbps on Tofino switches, making it the fastest known clustering algorithm.
  • Reduced Flow Completion Time (FCT):
    • For short flows, QCluster reduces average FCT by up to 56.6% (compared to PIAS-Real).
  • Overall average FCT is reduced by up to 21.7% over state-of-the-art methods (e.g., compared to pFabric for SRPT on W6).
  • QC-FQ shows significant improvements over PIAS-WST (42.4% and 14.3% lower FCT on W4 and W6, respectively) and DCTCP.
  • Improved Fairness: For Fair Queueing, QC-FQ achieves a Jain's Fairness Index that is 11.7% higher than AFQ.
  • Enhanced Application Throughput: For Deadline-Aware scheduling, QC-DDL increases application throughput by about 15% compared to pFabric-EDF and 29% compared to DCTCP.
  • Effective Packet Disorder Avoidance: PDA reduces packet disorder by up to 35.2% for SRPT with a minimal FCT increase of ~2%.

Limitations and Future Work

  • Hardware Implementation Constraints: The paper notes that the Tofino switch does not support division in the data plane, requiring periodic updates of queue weights from the control plane. This introduces a slight delay in weight updates.
  • Message vs. Flowlet Distinction: While the SCM sketch can distinguish between messages and flowlets, the paper acknowledges that accurately distinguishing them in practice can be challenging and impacts performance (as shown in Figure 13).
  • Future Work: The authors suggest that QCluster can be adapted for hybrid scheduling scenarios, combining different scheduling goals. They also provide source code for ns-2 simulations, encouraging further research and development. The paper also implicitly points to the ongoing evolution of programmable network hardware as a platform for implementing such advanced scheduling techniques.

Summary updated

BibTeX
@inproceedings{yang2022qcluster,
  author = {Tong Yang and Jizhou Li and Yikai Zhao and Kaicheng Yang and Hao Wang and Jie Jiang and Yinda Zhang and Nicholas Zhang},
  title = {{QCluster: Clustering Packets for Flow Scheduling}},
  booktitle = {The Web Conference},
  year = {2022},
  doi = {10.1145/3485447.3511980},
}
Figure