Skip to main content
QUICK REVIEW

[Paper Review] Hierarchical Heavy Hitters with the Space Saving Algorithm

Michael Mitzenmacher, Thomas Steinke|arXiv (Cornell University)|Feb 27, 2011
Network Security and Intrusion DetectionComputer Science13 references10 citations
TL;DR

This paper proposes a novel, simplified streaming algorithm for Hierarchical Heavy Hitters (HHHs) using the Space Saving algorithm as a subroutine, achieving superior speed and accuracy over prior methods while maintaining strong theoretical guarantees. The approach efficiently handles one- and two-dimensional hierarchies, reduces TCAM operations per update, and outperforms existing algorithms in both performance and practicality for real-world network monitoring workloads.

ABSTRACT

The Hierarchical Heavy Hitters problem extends the notion of frequent items to data arranged in a hierarchy. This problem has applications to network traffic monitoring, anomaly detection, and DDoS detection. We present a new streaming approximation algorithm for computing Hierarchical Heavy Hitters that has several advantages over previous algorithms. It improves on the worst-case time and space bounds of earlier algorithms, is conceptually simple and substantially easier to implement, offers improved accuracy guarantees, is easily adopted to a distributed or parallel setting, and can be efficiently implemented in commodity hardware such as ternary content addressable memory (TCAMs). We present experimental results showing that for parameters of primary practical interest, our two-dimensional algorithm is superior to existing algorithms in terms of speed and accuracy, and competitive in terms of space, while our one-dimensional algorithm is also superior in terms of speed and accuracy for a more limited range of parameters.

Motivation & Objective

  • To address the limitations of existing streaming algorithms for Hierarchical Heavy Hitters (HHHs), which are often complex, slow, or lack strong theoretical guarantees.
  • To develop a method that maintains high accuracy and low space usage while being simple to implement and deploy in real-world systems like routers and TCAMs.
  • To improve upon previous algorithms by offering better worst-case time and space bounds, enhanced accuracy, and support for distributed and parallel execution.
  • To demonstrate practical superiority through experiments on real packet traces, showing faster processing and lower TCAM operation counts.

Proposed method

  • The algorithm uses the Space Saving algorithm as a core subroutine to maintain approximate frequency counts for items in a hierarchical data structure.
  • It extends Space Saving to support hierarchical aggregation by propagating updates through parent nodes based on predefined lattice structures.
  • For one-dimensional HHHs, the algorithm maintains a single instance of Space Saving per level of the hierarchy; for two-dimensional HHHs, it maintains multiple instances across source and destination dimensions.
  • The algorithm ensures correctness by requiring that a node is reported as a heavy hitter only if the sum of its children's frequencies exceeds a threshold, preventing false positives from descendants.
  • It is designed to be TCAM-friendly, minimizing the number of TCAM operations per packet by exploiting non-uniform frequency distributions in high-level nodes.
  • The implementation supports both unitary (count-only) and weighted updates, with performance independent of the threshold parameter φ.

Experimental results

Research questions

  • RQ1Can a simpler algorithm achieve better performance than existing complex HHH algorithms while maintaining strong theoretical error bounds?
  • RQ2How does the proposed algorithm compare to prior methods in terms of speed, accuracy, and memory usage on real-world network traffic data?
  • RQ3To what extent can the Space Saving algorithm be extended to multi-dimensional hierarchical data with provable guarantees?
  • RQ4Can the algorithm be efficiently implemented in commodity hardware like TCAMs, and how does its TCAM operation count compare to prior work?

Key findings

  • In one-dimensional settings with ε = 0.1, the proposed 'unitary' algorithm processed 2.2 million packets per second, outperforming partial (1.3M) and full (1.4M) algorithms.
  • In two-dimensional settings with ε = 0.1, the 'hhh' algorithm processed 300,000 updates per second, more than three times faster than partial (71,000) and full (100,000) algorithms.
  • The relative error of the proposed algorithm was uniformly lower than all competitors, with the partial ancestry algorithm often reaching the theoretical upper bound of 1.
  • The TCAM simulation showed an average of 14 operations per packet in one dimension (2.8 per Space Saving instance), and 65 operations per packet in two dimensions (2.6 per instance), outperforming prior implementations that required up to 4 operations per update.
  • The algorithm’s running time and memory usage are independent of the threshold φ, as φ only affects the output phase, which is negligible in practice.
  • The algorithm maintains strong theoretical guarantees and is more practical than prior methods due to its simplicity, parallelizability, and hardware efficiency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.