Presentation is loading. Please wait.

Presentation is loading. Please wait.

Detecting Duplicates over Sliding Windows with RAM-Efficient Detached Counting Bloom Filter Arrays Jiansheng Wei †, Hong Jiang ‡, Ke Zhou † , Dan Feng.

Similar presentations


Presentation on theme: "Detecting Duplicates over Sliding Windows with RAM-Efficient Detached Counting Bloom Filter Arrays Jiansheng Wei †, Hong Jiang ‡, Ke Zhou † , Dan Feng."— Presentation transcript:

1 Detecting Duplicates over Sliding Windows with RAM-Efficient Detached Counting Bloom Filter Arrays Jiansheng Wei †, Hong Jiang ‡, Ke Zhou † , Dan Feng †, Hua Wang † † School of Computer, Huazhong University of Science and Technology, Wuhan, China Wuhan National Laboratory for Optoelectronics, Wuhan, China ‡ Dept. of Computer Science and Engineering, University of Nebraska-Lincoln, Lincoln, NE, USA

2 Background and Motivation  Duplicate detection is an important technique for monitoring and analysing data streams.  Recent studies estimate that about 294 billion s are sent per day all over the world in 2010 [1] and around 89.1% of them are spam s [2].  If all the s must be scanned for the purposes of anti-spam, anti- virus or homeland security, it is important for the server to quickly identify duplicates and analyse only unique s.  Since the real-world data streams can be updated frequently and grow to very large sizes, it is impractical to trace and analyse all the elements in such data streams. [1] The Radicati Group, Inc. (2010) Statistics Report, [2] Symantec Corp. (2010) MessageLabs Intelligence: 2010 Annual Security Report.

3 Background and Motivation  Existing approaches usually employ a decaying window model to evict stale items and record the most recent elements.  Landmark Window Model  Jumping Window Model  Sliding Window Model The challenge is how to design a membership representation scheme that supports fast search, insertion and deletion of time-ordered elements with low RAM consumption.

4 Background and Motivation  To achieve high space efficiency and maintain high query performance, Bloom filters (BFs) have been widely used to represent membership of static data sets.  A BF for representing a static set S = {e 1, e 2, …, e n } of n elements consists of an array of m bits and a group of k independent hash functions h 1, …, h k with the range of {1, …, m}.  A BF faces challenges when dealing with a dynamic set, i.e., it does not support element deletion. Fig. 1 Insert elements into a Bloom filter. Fig. 2 Query a Bloom filter. False positive: y is probably a member; No false negative: z is definitely not a member.

5 Outline  Background and Motivation  The DCBA Scheme  Analysis and Evaluation  Conclusions

6 The DCBA Scheme  A detached counting Bloom filters array (DCBA) consists of an array of detached counting Bloom filters (DCBFs) that are homogeneous and share the same hash functions.  A DCBF is a Bloom filter (BF) with each of its bits being associated with a counter, which functions as a timer to record the timestamp of the represented element.  All the timers of a DCBF are further grouped into a timer array (TA) to improve the access efficiency.

7 The DCBA Scheme  A window with size N slides over a data stream, and all the monitored elements are represented by an array of g DCBFs with each having a capacity of N/(g−1) elements. Fig. 3 Using DCBA to represent a sliding window in a single node.

8 The DCBA Scheme  The g DCBFs logically function as a circular FIFO queue.  Fully-filled DCBFs will be retained for query only until its elements become stale, and the corresponding timer array (TA) that can consume a great amount of memory space may be optionally offloaded to hard disks or flash store to save RAM resources. Fig. 3 Using DCBA to represent a sliding window in a single node.

9 The DCBA Scheme  A DCBA can also be split and maintained by r nodes, where each node holds a group of g DCBFs. All the r×g DCBFs logically function as a circular FIFO queue, and there is a filling DCBF and a decaying DCBF to accommodate fresh elements and evict stale elements respectively. Fig. 4 Using DCBA to represent a sliding window in a decentralized (clustered) system.

10 The DCBA Scheme  Bits belonging to different BFs but with the same offset are mapped and stored in the same bit vector so that they can be read or written simultaneously in a single memory access.  Considering that k hash functions are used and shared among the DCBFs, the memory access complexity of querying an item will be O(k) rather than O(k×g).  If a positive is produced by the decaying BF, the associated decaying TA will be queried to check whether the item has already expired. Fig. 5 The in-memory structure of a DCBA.

11 The DCBA Scheme  The bit width d of each timer is fundamentally determined by the capacity of the DCBA. Suppose that the capacity of a DCBA is N, each DCBF will be designed to hold N/(g−1) elements, and each timer will contain d= ⌈ log 2 N/(g−1) ⌉ bits to count from 0 to N/(g−1)−1, where 0 denotes the oldest timestamp.  E.g., if a DCBF is designed to accommodate 1M (2 20 ) elements, then each constructing timer will consume 20 bits to count from 0 to 2 20 −1. Fig. 5 The in-memory structure of a DCBA.

12 The DCBA Scheme  The DCBA scheme maintains a base timer that counts from 0 to N/(g−1)−1 in a circular manner to generate timestamps for the monitored elements.  To insert an element x, k bits in the filling BF will be chosen and set to 1 according to the hash functions hi(x) (1≤i≤k), and the k associated timers in the filling TA will be set to the value of the base timer.  The base timer will be incremented by 1 after an insert operation.  An element in the decaying DCBF will be considered expired once its timestamp becomes smaller than the base timer. Fig. 5 The in-memory structure of a DCBA. base timer

13 The DCBA Scheme  Since a representing bit as well as its associated timer can be shared by multiple elements in a DCBF, we determine the timestamp of an element according to a count-min policy.  The minimal value t among all the k timers corresponding to an element x will be considered as its timestamp.  The probability that all the k timers corresponding to x are occasionally shared and set by other elements with larger timestamps than x is very small and can be constrained by restricting the target error rate of each DCBF. Fig. 5 The in-memory structure of a DCBA. base timer

14 Outline  Background and Motivation  The DCBA Scheme  Analysis and Evaluation  Conclusions

15 Analysis and Evaluation  RAM Consumption  If the overall false positive rate of the DCBA is constrained to ε DCBA, the error rate threshold of each DCBF should be ε DCBF =1−(1−ε DCBA ) 1/g.  The optimal number of hush functions can be derived as k DCBF = ⌈ log 2 (1/ε DCBF ) ⌉.  The total space requirement of a DCBA is expressed as m DCBA-total =g×(d+1)× ⌈ log 2 e×k DCBF ×N/(g−1) ⌉.  Since the DCBA scheme allows up to g−2 TAs to be offloaded to disks, the minimal RAM consumption of a DCBA is therefore m DCBA-RAM =(g +2d)× ⌈ log 2 e×k DCBF ×N/(g−1) ⌉.

16 Analysis and Evaluation  RAM Consumption Fig. 6 Memory consumption of a DCBA. (a) Representing a sliding window with size 64M (1M=2 20 ). (b) Representing a sliding window with size 1,024M (1M=2 20 ).

17 Analysis and Evaluation  We have collected a sequence of 2,026,005,927 chunk fingerprints that contains 83,733,597 unique elements, which provides a real-world data set for measuring the performance and query accuracy of the DCBA scheme.  The experimental server that maintains a DCBA for monitoring the chunk fingerprint stream over a sliding window is configured as follows:  a 32-bit Windows operating system  a quad-core CPU running at 2 GHz  4×2GB RAM  16×1TB hard disks organized as a RAID-5 partition  2 gigabit network interface cards.

18 Analysis and Evaluation  Query Performance Fig. 7 Average query performance of a DCBA. (a) Representing a sliding window with an error rate threshold of 1/2 7. (b) Representing a sliding window with an error rate threshold of 1/2 14.

19 Analysis and Evaluation  Query Accuracy Fig. 8 False positive rate of a DCBA. (a) Representing a sliding window with an error rate threshold of 1/2 7. (b) Representing a sliding window with an error rate threshold of 1/2 14.

20 Outline  Background and Motivation  The DCBA Scheme  Analysis and Evaluation  Conclusions

21 Conclusion  This paper proposes a Detached Counting Bloom filter Array (DCBA) scheme to address the problem of detecting duplicates in data streams over sliding windows.  High query performance  High space efficiency  Scalability  Easy to be synchronized  Mathematical analysis and experimental results show that  a DCBA can achieve a high query performance that is comparable to the state- of-the-art timing Bloom filter approach in the same environment with a much lower RAM overhead than the latter.  the actual error rate of a DCBA can be well constrained at or below its predefined threshold.  In general, a DCBA outperforms existing schemes and is more flexible in representing massive stream elements in sliding windows.

22 Thanks! Questions? Acknowledgment This work is supported in part by the National Basic Research Program (973 Program) of China under Grant No. 2011CB302305, the National High Technology Research and Development Program (863 Program) of China under Grant No. 2009AA01A402, and the US NSF under Grants NSF-IIS , NSF-CCF and NSF-CNS The authors are grateful to the anonymous reviewers for their valuable comments and suggestions.


Download ppt "Detecting Duplicates over Sliding Windows with RAM-Efficient Detached Counting Bloom Filter Arrays Jiansheng Wei †, Hong Jiang ‡, Ke Zhou † , Dan Feng."

Similar presentations


Ads by Google