Randomized admission policy for efficient top-k and frequency estimation

Ran Ben-Basat, Gil Einziger, Roy Friedman, Yaron Kassner

In the high-speed world of network monitoring, identifying "heavy hitters"—the small number of flows that consume the most bandwidth—is a critical but difficult task. As line rates increase, the hardware used to track these flows faces a brutal bottleneck: fast memory (SRAM) is too small to track everything, and large memory (DRAM) is too slow to keep up.

This paper introduces the Randomized Admission Policy (RAP), a deceptively simple algorithmic tweak that allows network devices to identify top flows with up to 128x less memory than previous state-of-the-art methods.

TL;DR

RAP improves frequency estimation and top-$k$ identification by using a probabilistic "barrier to entry" for new flows. By only admitting new items into a monitoring table with a probability inversely proportional to the current minimum counter, it effectively filters out "tail" noise and preserves space for truly frequent flows.

What Problem Does This Paper Address?

Network administrators need to know which flows are the most frequent for tasks like load balancing, routing, and security. There are two traditional ways to do this:

  1. Sketches (e.g., Count-Min Sketch): These use hashing to map flows to shared counters. They are hardware-friendly but require significant over-provisioning to handle hash collisions.
  2. Counter-based algorithms (e.g., Space Saving): These maintain a fixed table of flows. When a new flow arrives and the table is full, they evict the least frequent flow.

The problem with counter-based methods is "tail pollution." In real-world networks, a massive number of flows appear only once or twice. In a deterministic system like Space Saving, every single one of these "tail" packets can trigger an eviction, constantly kicking out potentially important flows and degrading accuracy.

Methods

The authors propose Randomized Admission Policy (RAP). The logic is straightforward:

  • If a packet arrives for a flow already in the table, increment its counter.
  • If the flow isn't in the table and there is space, add it.
  • The Innovation: If the table is full, find the flow $m$ with the minimum counter value $c_m$. Instead of automatically replacing it, admit the new flow with probability $P = \frac{1}{c_m + 1}$.

If the new flow "wins" the coin toss, it replaces the old one and its counter is set to $c_m + 1$. If it loses, it is simply ignored.

The authors also introduce $d$-Way RAP (dW-RAP), a version designed for hardware. Instead of searching the entire table for the minimum counter (which is slow), it uses a set-associative cache architecture. A flow is hashed to a specific "set" (e.g., 16 possible slots), and the algorithm only considers the minimum within that small set.

Datasets

The researchers evaluated RAP against four types of data:

  1. CAIDA 2015: Real-world anonymized internet traces (18M packets).
  2. UCLA Trace: UDP traffic from a university border router (32M packets).
  3. YouTube Trace: A sequence of 600K accesses to YouTube content.
  4. Synthetic Zipf Distributions: Generated traces with varying degrees of "skewness" (from mildly skewed to heavy-tailed).

Key Insights and Ideas

  • Probabilistic Stability: By making it hard for new flows to enter the table, RAP ensures that a flow must appear multiple times (on average) before it can displace an existing entry. This creates a "natural selection" process where only frequent flows survive.
  • The Power of $1/(c+1)$: This specific probability is elegant because it ensures the estimator remains unbiased—the expected value of the counter stays close to the true frequency.
  • Hardware-Algorithm Synergy: The discovery that a 16-way associative cache (16W-RAP) performs nearly as well as a fully associative table is a major win for hardware engineers. It means RAP can be implemented using standard cache logic already present in many chips.

Key Results

  • Massive Space Savings: On heavy-tailed workloads, RAP achieved the same accuracy as existing methods while using 128x less memory. On real-world traces, the reduction was typically between 4x and 32x.
  • Superior Top-k Identification: In scenarios with low skew (where heavy hitters are harder to distinguish from the crowd), RAP was often the only algorithm that could successfully identify a high percentage of the top flows.
  • MSE Improvements: For frequency estimation, RAP consistently provided a lower Mean Square Error (MSE) than Count-Min Sketches, even when the sketches were given 8x more counters.

Limitations and Future Work

The authors acknowledge a few areas for further exploration:

  • I.I.D. Assumption: Much of the formal mathematical proof assumes packets arrive independently and identically distributed (i.i.d.), which doesn't account for "bursty" traffic or temporal locality.
  • Adaptive Probabilities: The current version of RAP works best when the admission probability is tuned to the data's skew. The authors suggest that future versions should dynamically adapt the admission policy without needing prior knowledge of the traffic patterns.
  • Real-world Integration: While the simulations are extensive, the next step is integrating dW-RAP into production-grade network switches and routers.

Summary updated

BibTeX
@inproceedings{benbasat2017randomized,
  author = {Ran Ben-Basat and Gil Einziger and Roy Friedman and Yaron Kassner},
  title = {{Randomized admission policy for efficient top-k and frequency estimation}},
  booktitle = {INFOCOM},
  year = {2017},
  url = {https://openreview.net/forum?id=Mk4m3Dk3p0},
}
Figure