Hierarchical Multiresource Fair Queueing for Packet Processing

Chaoqun You, Yangming Zhao, Gang Feng, Tony Q. S. Quek, Lemin Li · DOI

TL;DR

This paper introduces two novel algorithms—Collapsed H-DRFQ and Dove-tailing H-DRFQ—that extend multi-resource fair queueing to hierarchical traffic structures. By accounting for diverse resource demands (like CPU and bandwidth) across nested groups of flows, these algorithms ensure that service classes and tenants receive their guaranteed shares even when processing requirements are highly asymmetrical.

What Problem Does This Paper Address?

Modern networks rely on "middleboxes"—software-defined functions like firewalls, proxies, and load balancers. Unlike traditional routers that primarily manage link bandwidth, middleboxes consume a cocktail of resources: CPU for encryption, memory for state tracking, and I/O for packet handling.

The gold standard for fairness in this multi-resource environment is Dominant Resource Fairness (DRF), which ensures flows receive equal shares of their most heavily taxed resource. However, real-world traffic isn't just a flat list of flows; it’s a hierarchy. You might have a "Tenant" (Group A) that contains "Service Classes" (Voice vs. Data), which then contain individual "Flows."

Existing algorithms fail here. If you naively apply multi-resource fairness to a hierarchy, a group can end up with less than its fair share because the "dominant resource" of a group isn't simply the sum of its parts. This paper tackles the challenge of providing Hierarchical Share Guarantees—ensuring every node in a tree gets its promised resource slice regardless of what other branches are doing.

Methods

The authors propose two distinct architectural approaches to solve the hierarchical puzzle:

  1. Collapsed H-DRFQ: This approach "flattens" the hierarchy. The authors introduce the concept of a Virtual Packet Profile, which mathematically aggregates the resource demands of a subtree into a single representative profile. By recalculating weights for every leaf node based on this profile, the entire hierarchy can be treated as a flat tree and scheduled using standard, high-speed algorithms.
  2. Dove-tailing H-DRFQ: This is a recursive approach. It applies fair queueing at every level of the hierarchy. To prevent flows from "gaming" the system by alternating between different resource-heavy tasks, it uses "dove-tailing"—a memory-based mechanism that tracks past resource usage to ensure long-term fairness.

While Collapsed H-DRFQ is easier to implement on existing hardware, Dove-tailing H-DRFQ offers tighter theoretical bounds on packet delay.

Datasets

The study evaluates the algorithms using a mix of synthetic workloads and established processing models:

  • Traffic Generation: 15 UDP flows generated via the FastUDPSource module in the Click modular router, with packet sizes ranging from 200 to 1400 bytes.
  • Resource Models: The authors used empirically derived linear models for CPU processing time for three common middlebox tasks:
  • Basic Forwarding: (0.00286 × PacketSize + 6.2) μs
    • Statistical Monitoring: (0.0008 × PacketSize + 12.1) μs
    • IPSec Encryption: (0.015 × PacketSize + 84.5) μs
  • Testbed: A physical implementation on a 3.1 GHz Intel Core i5 machine running the Click modular router, emulating a 200 Mbps congested link.

Key Insights and Ideas

  • The "Aha" Moment on Naive Extensions: The authors prove that simply flattening a tree or applying DRFQ level-by-level without memory leads to "resource leakage," where a group receives significantly less than its 50% share because its children have complementary resource needs.
  • Virtual vs. Logical Profiles: The paper distinguishes between a Virtual Profile (a static weighted average used for flattening) and a Logical Profile (a dynamic, time-varying demand used in recursive scheduling).
  • The Delay-Complexity Trade-off: There is a fascinating inversion in performance. Theoretically, Dove-tailing has a better delay bound. However, experimental results showed that Collapsed H-DRFQ actually provides lower delays for flows closer to the root of the tree, while Dove-tailing excels for flows buried deep in complex hierarchies.

Key Results

  • Fairness Verification: In dynamic tests where flows joined and left at different times, both algorithms successfully converged to the correct hierarchical shares (e.g., a CPU-bound IPSec flow and a bandwidth-bound forwarding flow each received their exact 50% dominant share).
  • Delay Bounds: Dove-tailing H-DRFQ achieved a 20% reduction in the number of packets experiencing long delays compared to the Collapsed version in complex 4-level hierarchies.
  • Runtime Efficiency: Collapsed H-DRFQ is significantly faster in practice (3x to 5x lower runtime overhead) because it only performs complex calculations when the hierarchy structure changes, whereas Dove-tailing must manage state for every internal node during every scheduling decision.

Limitations and Future Work

  • Recomputation Overhead: Collapsed H-DRFQ requires a full weight recalculation whenever a flow joins or leaves. In highly volatile environments with thousands of short-lived flows, this could become a bottleneck.
  • Hardware Constraints: While implemented in the Click software router, the authors note that mapping these hierarchical multi-resource logic gates to high-speed ASIC or FPGA hardware remains a significant engineering challenge.
  • Future Direction: The authors suggest exploring how these algorithms could be adapted for "space-shared" resources like cache capacity or memory buffers, which behave differently than "time-shared" resources like CPU cycles.

Summary updated

BibTeX
@article{you2022hierarchical,
  author = {Chaoqun You and Yangming Zhao and Gang Feng and Tony Q. S. Quek and Lemin Li},
  title = {{Hierarchical Multiresource Fair Queueing for Packet Processing}},
  journal = {IEEE Transactions on Network and Service Management},
  year = {2022},
  doi = {10.1109/tnsm.2022.3197747},
}
Figure