[论文解读] Count-Less: A Counting Sketch for the Data Plane of High Speed Switches
Count-Less 提出了一种新型计数草图,用于高速交换机数据平面,通过结合 Split Counter 数据结构与 Minimum Update 算法,提升了 Count-Min 草图的准确性。它在流大小、基数、熵和流分布估计方面表现出色,优于 FCM 和 Elastic Sketch,同时在基于 Tofino 等 ASIC 的可编程交换机中降低了内存使用量和延迟。
Demands are increasing to measure per-flow statistics in the data plane of high-speed switches. Measuring flows with exact counting is infeasible due to processing and memory constraints, but a sketch is a promising candidate for collecting approximately per-flow statistics in data plane in real-time. Among them, Count-Min sketch is a versatile tool to measure spectral density of high volume data using a small amount of memory and low processing overhead. Due to its simplicity and versatility, Count-Min sketch and its variants have been adopted in many works as a stand alone or even as a supporting measurement tool. However, Count-Min's estimation accuracy is limited owing to its data structure not fully accommodating Zipfian distribution and the indiscriminate update algorithm without considering a counter value. This in turn degrades the accuracy of heavy hitter, heavy changer, cardinality, and entropy. To enhance measurement accuracy of Count-Min, there have been many and various attempts. One of the most notable approaches is to cascade multiple sketches in a sequential manner so that either mouse or elephant flows should be filtered to separate elephants from mouse flows such as Elastic sketch (an elephant filter leveraging TCAM + Count-Min) and FCM sketch (Count-Min-based layered mouse filters). In this paper, we first show that these cascaded filtering approaches adopting a Pyramid-shaped data structure (allocating more counters for mouse flows) still suffer from under-utilization of memory, which gives us a room for better estimation. To this end, we are facing two challenges: one is (a) how to make Count-Min's data structure accommodate more effectively Zipfian distribution, and the other is (b) how to make update and query work without delaying packet processing in the switch's data plane. Count-Less adopts a different combination ...
研究动机与目标
- 为解决 Count-Min 草图在高速交换机中因内存利用率低下和无差别计数器更新而导致的估计准确性有限的问题。
- 克服 FCM 和 Elastic Sketch 等级联多草图方法的低效问题,这些方法尽管采用分层过滤,但仍存在内存利用率不足的问题。
- 设计一种单草图解决方案,其准确性可与多层草图媲美或超越,且不依赖 TCAM 等专用硬件。
- 通过最小化寄存器访问和更新操作,实现在可编程交换机中低延迟、高吞吐量的数据包处理。
- 为实际部署在高速交换机上提供一种 ASIC 友好的 P4 实现方案。
提出的方法
- 引入 Split Counter 策略,将更多计数器分配给较小的(鼠类)流,在 Zipf 分布的流量下提升内存效率。
- 采用 Minimum Update 算法,通过在 d 个哈希位置中仅选择最小值的计数器来减少每包更新的计数器数量。
- 使用单一 Count-Min 类似草图结构,避免级联草图或基于 TCAM 的过滤器所带来的复杂性和资源开销。
- 设计适用于基于 ASIC 的可编程交换机(如 Tofino)的 P4 兼容实现,最小化 SRAM、ALU 使用量和哈希位数。
- 采用保守的更新逻辑,在保持低处理延迟的同时减少高估偏差。
- 采用受金字塔结构启发的分层计数器分配策略,但针对内存利用率和更新效率进行了优化。
实验结果
研究问题
- RQ1在无专用硬件的情况下,单草图是否能优于 FCM 和 Elastic Sketch 等级联多草图系统,在单流测量准确性方面表现更优?
- RQ2Split Counter 策略在 Zipf 分布流量下如何提升内存利用率和估计准确性?
- RQ3Minimum Update 算法在数据平面中在多大程度上减少了计数器更新次数和处理延迟?
- RQ4与最先进草图相比,Count-Less 是否能以更低的内存占用和更少的资源消耗(SRAM、ALU、哈希位)实现高准确性?
- RQ5Count-Less 在真实硬件(如基于 ASIC 的可编程交换机,例如 Tofino)中是否可行且高效?
主要发现
- 采用 Minimum Update 策略的 Count-Less(CL4-MU)在整体准确性上表现最佳,将流大小估计的平均相对误差(ARE)降低至 0.601,远低于标准 Count-Min 的 7.181。
- CL4-MU 将基数估计的相对误差(RE)降低至 0.001,显著低于 Count-Min(0.007)和 FCM(0.002)。
- 在流大小分布估计中,CL4-MU 实现了加权平均相对误差(WMRE)为 0.294,优于 FCM(0.291),并显著优于 Count-Min(1.159)。
- 熵估计的相对误差降低至 0.005(CL4-MU),相比 Count-Min(0.018)和 FCM(0.006),显示出更优的偏差控制能力。
- 在 Tofino ASIC 交换机上,Count-Less 的延迟比 FCM 降低 1.53 倍,同时 SRAM、ALU 操作和哈希位数均更少。
- P4 中的原型实现验证了其在真实硬件中的可行性与性能提升,与理论分析和 CPU 基准测试结果一致。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。