Skip to main content
QUICK REVIEW

[论文解读] RVH: Range-Vector Hash for Fast Online Packet Classification

Tong Shen, Gaogang Xie|arXiv (Cornell University)|Sep 16, 2019
Network Packet Processing and Optimization参考文献 34被引用 5
一句话总结

RVH 提出了一种基于哈希的新型数据包分类算法,通过引入范围向量(range-vectors)根据前缀长度分布对规则进行分区,从而减少哈希表数量和哈希冲突概率,实现了快速规则更新与高速数据包分类的双重加速。该方法相比现有最先进方法,分类速度最高提升15.7倍,更新速度提升2.3倍,同时内存使用量降低44%。

ABSTRACT

Packet classification according to multi-field ruleset is a key component for many network applications. Emerging software defined networking and cloud computing need to update the rulesets frequently for flexible policy configuration. Their success depends on the availability of the new generation of classifiers that can support both fast ruleset updating and high-speed packet classification. However, existing packet classification approaches focus either on high-speed packet classification or fast rule update, but no known scheme meets both requirements. In this paper, we propose Range-vector Hash (RVH) to effectively accelerate the packet classification with a hash-based algorithm while ensuring the fast rule update. RVH is built on our key observation that the number of distinct combinations of each field prefix lengths is not evenly distributed. To reduce the number of hash tables for fast classification, we introduce a novel concept range-vector with each specified the length range of each field prefix of the projected rules. RVH can overcome the major obstacle that hinders hash-based packet classification by balancing the number of hash tables and the probability of hash collision. Experimental results demonstrate that RVH can achieve the classification speed up to 15.7 times and the update speed up to 2.3 times that of the state-of-the-art algorithms on average, while only consuming 44% less memory.

研究动机与目标

  • 为解决动态网络环境中同时实现高速数据包分类与快速规则更新这一长期挑战。
  • 克服现有基于哈希与基于树的分类算法在分类速度与更新效率之间存在的权衡问题。
  • 设计一种可扩展的在线分类器,支持频繁的规则更新而不牺牲分类性能。
  • 通过基于前缀长度分布的智能规则分区,最小化哈希冲突并减少哈希表数量。
  • 在保持高吞吐量的同时优化内存使用,以适应真实世界中的云环境与软件定义网络(SDN)工作负载。

提出的方法

  • 提出范围向量(range-vector)概念,根据字段前缀长度的分布对规则进行分组,实现规则空间的高效分区。
  • 使用基向量(base-vectors)在异构长度前缀环境中指导哈希键的构建,提升哈希函数效率。
  • 采用分析模型确定最优哈希表数量,在表数量与冲突概率之间取得平衡,从而最小化分类时间。
  • 应用一种分区策略,减少规则在不同哈希表间的重叠,降低哈希冲突带来的额外开销。
  • 采用 Cuckoo 哈希机制以提升内存利用率,并通过每次更新仅需一次平均哈希操作,支持在线规则更新。
  • 设计基于多核的扩展策略,结合运行至完成(Run-to-Complete)与软件流水线(Software Pipeline)模式,进一步加速分类与更新操作。

实验结果

研究问题

  • RQ1基于哈希的分类器能否同时实现高速数据包分类与快速规则更新?
  • RQ2基于前缀长度分布的规则分区如何减少哈希表数量与冲突概率?
  • RQ3在保持低内存使用的同时,最小化分类时间的最优哈希表数量是多少?
  • RQ4规则重叠如何影响分类性能?是否可通过智能分区策略有效降低?
  • RQ5所提出方法在多核环境中是否具备良好可扩展性,从而实现进一步性能提升?

主要发现

  • 与 Tuple Space Search (TSS) 相比,RVH 平均分类速度提升 15.7 倍;与 PartitionSort (PS) 相比提升 14.1 倍;与 TupleMerge (TM) 相比提升 1.6 倍。
  • RVH 的更新速度平均比 PS 快 3.9 倍,比 TM 快 1.7 倍,比 TSS 快 1.1 倍。
  • RVH 将内存占用降低至 PS 的 38% 和 TSS 的 56%,同时保持与 TM 相当的性能水平。
  • 当更新速率超过每秒 10,000 次时,仅 RVH 能维持稳定的分类性能,而 PS 等方法性能显著下降。
  • 当范围向量大小保持在 8 以下时,每个哈希表项的平均重叠规则数始终低于 1.0,验证了分区策略的有效性。
  • 在多核扩展中,仅对更新相关的规则段加锁,可显著降低竞争,实现进一步性能提升。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。