Pyramid Sketch: a Sketch Framework

Slides:



Advertisements
Similar presentations
The HV-tree: a Memory Hierarchy Aware Version Index Rui Zhang University of Melbourne Martin Stradling University of Melbourne.
Advertisements

Overcoming Limitations of Sampling for Agrregation Queries Surajit ChaudhuriMicrosoft Research Gautam DasMicrosoft Research Mayur DatarStanford University.
Jianxin Li, Chengfei Liu, Rui Zhou Swinburne University of Technology, Australia Wei Wang University of New South Wales, Australia Top-k Keyword Search.
TI: An Efficient Indexing Mechanism for Real-Time Search on Tweets Chun Chen 1, Feng Li 2, Beng Chin Ooi 2, and Sai Wu 2 1 Zhejiang University, 2 National.
Pete Bohman Adam Kunk.  Introduction  Related Work  System Overview  Indexing Scheme  Ranking  Evaluation  Conclusion.
Distributed Approximate Spectral Clustering for Large- Scale Datasets FEI GAO, WAEL ABD-ALMAGEED, MOHAMED HEFEEDA PRESENTED BY : BITA KAZEMI ZAHRANI 1.
LCM: An Efficient Algorithm for Enumerating Frequent Closed Item Sets L inear time C losed itemset M iner Takeaki Uno Tatsuya Asai Hiroaki Arimura Yuzo.
New Sampling-Based Summary Statistics for Improving Approximate Query Answers P. B. Gibbons and Y. Matias (ACM SIGMOD 1998) Rongfang Li Feb 2007.
Acceleration of the Smith– Waterman algorithm using single and multiple graphics processors Author : Ali Khajeh-Saeed, Stephen Poole, J. Blair Perot. Publisher:
Bitmap Index Buddhika Madduma 22/03/2010 Web and Document Databases - ACS-7102.
Streaming Algorithms for Robust, Real- Time Detection of DDoS Attacks S. Ganguly, M. Garofalakis, R. Rastogi, K. Sabnani Krishan Sabnani Bell Labs Research.
1 Reversible Sketches for Efficient and Accurate Change Detection over Network Data Streams Robert Schweller Ashish Gupta Elliot Parsons Yan Chen Computer.
Ph.D. DefenceUniversity of Alberta1 Approximation Algorithms for Frequency Related Query Processing on Streaming Data Presented by Fan Deng Supervisor:
Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:
Reverse Hashing for High-speed Network Monitoring: Algorithms, Evaluation, and Applications Robert Schweller 1, Zhichun Li 1, Yan Chen 1, Yan Gao 1, Ashish.
Performance Evaluation of IPv6 Packet Classification with Caching Author: Kai-Yuan Ho, Yaw-Chung Chen Publisher: ChinaCom 2008 Presenter: Chen-Yu Chaug.
What ’ s Hot and What ’ s Not: Tracking Most Frequent Items Dynamically G. Cormode and S. Muthukrishman Rutgers University ACM Principles of Database Systems.
1 Improving Hash Join Performance through Prefetching _________________________________________________By SHIMIN CHEN Intel Research Pittsburgh ANASTASSIA.
1 Presenter: Chien-Chih Chen Proceedings of the 2002 workshop on Memory system performance.
SIGCOMM 2002 New Directions in Traffic Measurement and Accounting Focusing on the Elephants, Ignoring the Mice Cristian Estan and George Varghese University.
Compact Data Structures and Applications Gil Einziger and Roy Friedman Technion, Haifa.
« Performance of Compressed Inverted List Caching in Search Engines » Proceedings of the International World Wide Web Conference Commitee, Beijing 2008)
CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center.
TinyLFU: A Highly Efficient Cache Admission Policy
HPCLatAm 2013 HPCLatAm 2013 Permutation Index and GPU to Solve efficiently Many Queries AUTORES  Mariela Lopresti  Natalia Miranda  Fabiana Piccoli.
A Formal Analysis of Conservative Update Based Approximate Counting Gil Einziger and Roy Freidman Technion, Haifa.
New Sampling-Based Summary Statistics for Improving Approximate Query Answers Yinghui Wang
CPSC 252 Hashing Page 1 Hashing We have already seen that we can search for a key item in an array using either linear or binary search. It would be better.
Calculating frequency moments of Data Stream
Page 1 A Platform for Scalable One-pass Analytics using MapReduce Boduo Li, E. Mazur, Y. Diao, A. McGregor, P. Shenoy SIGMOD 2011 IDS Fall Seminar 2011.
Efficient Processing of Updates in Dynamic XML Data Changqing Li, Tok Wang Ling, Min Hu.
1 ECE 526 – Network Processing Systems Design System Implementation Principles I Varghese Chapter 3.
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
1 IP Routing table compaction and sampling schemes to enhance TCAM cache performance Author: Ruirui Guo, Jose G. Delgado-Frias Publisher: Journal of Systems.
Exploiting Graphics Processors for High-performance IP Lookup in Software Routers Jin Zhao, Xinya Zhang, Xin Wang, Yangdong Deng, Xiaoming Fu IEEE INFOCOM.
SketchVisor: Robust Network Measurement for Software Packet Processing
Xin Li , Chen Qian University of Kentucky
Privacy Preserving Subgraph Matching on Large Graphs in Cloud
International Conference on Data Engineering (ICDE 2016)
Lecture 16: Data Storage Wednesday, November 6, 2006.
The Variable-Increment Counting Bloom Filter
Parallel Density-based Hybrid Clustering
Privacy Preserving Subgraph Matching on Large Graphs in Cloud
Drum: A Rhythmic Approach to Interactive Analytics on Large Data
Augmented Sketch: Faster and More Accurate Stream Processing
Byung Joon Park, Sung Hee Kim
Query-Friendly Compression of Graph Streams
Yu-Guang Chen1,2, Wan-Yu Wen1, Tao Wang2,
Preference Query Evaluation Over Expensive Attributes
Hash Table.
Spatial Online Sampling and Aggregation
Cache Memories September 30, 2008
COMPI: Concolic Testing for MPI Applications
Towards Automatic Model Synchronization from Model Transformation
Elastic Sketch: Adaptive and Fast Network-wide Measurements
Stephen Smart & Christan Grant IRI 2017
Lesson 15: Processing Arrays
Degree-aware Hybrid Graph Traversal on FPGA-HMC Platform
CSCE 3110 Data Structures & Algorithm Analysis
Lecture 29: Virtual Memory-Address Translation
Efficient Document Analytics on Compressed Data: Method, Challenges, Algorithms, Insights Feng Zhang †⋄, Jidong Zhai ⋄, Xipeng Shen #, Onur Mutlu ⋆, Wenguang.
Jianbo Dong, Lei Zhang, Yinhe Han, Ying Wang, and Xiaowei Li
Approximate Frequency Counts over Data Streams
CACHE-CONSCIOUS INDEXES
Elastic Sketch: Adaptive and Fast Network-wide Measurements
On the Designing of Popular Packages
Lu Tang , Qun Huang, Patrick P. C. Lee
Donghui Zhang, Tian Xia Northeastern University
Scalable light field coding using weighted binary images
Learning and Memorization
Presentation transcript:

Pyramid Sketch: a Sketch Framework for Frequency Estimation of Data Streams Tong Yang, Yang Zhou, Hao Jin, Peking University Shigang Chen, University of Florida, USA Xiaoming Li, Peking University, China Good afternoon, everyone. My name is Tong Yang from Peking University, China. today, my topic is Pyramid sketch:

Outline 3. Evaluation 1. Background Experiment setup Effects of techniques Accuracy Speed 4. Conclusion 1. Background Problem to address Prior art 2. Pyramid Techniques Counter-pair sharing Word acceleration Word constraint Word sharing One hashing Ostrich policy Here is the outline, We first introduce the background.

Outline 3. Evaluation 1. Background Experiment setup Effects of techniques Accuracy Speed 4. Conclusion 1. Background Problem to address Prior art 2. Three Techniques Counter-pair sharing Word acceleration Word constraint Word sharing One hashing Ostrich policy

Background High speed Hot Items Updating Data Structure Problem: High speed Hot Items Updating Data Structure Frequency Query Updating A data stream is composed of hot items and cold items. Each item can appear more than once. In practice, most items are cold items with low frequencies, while a few items are hot items with high frequencies. Given an Item, the question is how many times does it appear? One straightforward solution is to use a hash table. However, hash table is not memory efficient, and the update speed is slow and not reasonable bounded. Nowadays, the speed of data stream is often very high, and it is often impractical and unnecessary to exactly record all item information. Cold Items Hash tables: memory inefficient, and slow

Background Typical sketches: • CM sketch -------Journal of Algorithms 2005, cited 976 times. • CU sketch -------SIGCOMM 2002, cited 949 times. • Count sketch -------Automata, Languages and Programming, 2002, cited 715 times. • Augmented sketch ------ SIGMOD 2016 • Slim-Fat sketch ------ ICDE 2017 To address this problem, sketch, a probabilistic data structure becomes popular. There are various sketches, typical sketches include

Background e Insertion: when a new item e comes Prior art --- CM Sketch Insertion: when a new item e comes Query: query for the frequency of the item e Deletion: delete item e 5 7 -1 10 +1 -1 +1 +1 -1 Reported value: 5 … … e The most well known sketches are CM and CU sketches.

Background e Insertion: when a new item e comes Prior art --- CU Sketch Insertion: when a new item e comes Query: query for the frequency of the item e 5 7 10 +1 Reported value: 5 … … e Obviously, CU sketch achieves higher accuracy than CM Sketch.

Background Hot item Cold item 2 • Design goal: High memory efficiency High update speed High accuracy Hot items need large counters, to meet the need of hot items, existing sketches use large counters

Outline 3. Evaluation 1. Background Experiment setup Effects of techniques Accuracy Speed 4. Conclusion 1. Background Problem to address Prior art 2. Pyramid Techniques Counter-pair sharing Word acceleration Word constraint Word sharing One hashing Ostrich policy Then we show how our pyramid sketch to achieve high accuracy and high speed. Our pyramid sketch including the following techniques

Techniques I Hybrid Counter ... Pure Counter ... … e   1 Counter-pair Sharing   Hybrid Counter ... Pure Counter   … … ...   … …   … … The first technique is called counter-pair sharing. There are multiple layers in our framework, each layer is a counter array, each counter is the same size, for example, 4 bits. Each counter has only four bits, thus it could overflow during insertions. When a counter overflows, we use its parent counter to record the number of overflows. Note that every two adjacent counters share one parent counter at the higher layer. Obviously, the number of counters is halved layer by layer. The counters at the first layer are pure counters. It means that each counter is used to only record frequencies. Other counters at the rest layers are hybrid counters.   … e

Techniques I left flag right flag counting part parent left child 1 Counter-pair Sharing left flag right flag counting part parent Let show the data structure of hybrid counters. left child right child

Techniques I Insertion Example: The counter size is set to 4 bits. 1 Counter-pair Sharing Insertion Example: The counter size is set to 4 bits. parent L2 1 1 An item e comes in. Right child counter is supposed to be incremented L1 10 16 15 left child right child Perform a carry operation e

Techniques I Query Example: The counter size is set to 4 bits. L3 L2 1 Counter-pair Sharing Query Example: The counter size is set to 4 bits. L3 2 1 L2 parent 1 1 We want to query the item e. Query value from the right child can be obtained as shown. L1 10 left child right child 0*1 + 1*1*16 + 0*2*64 = 16 e

Techniques I • Memory efficiency: 1) Counter size is kept small. 1 Counter-pair Sharing • Memory efficiency: 1) Counter size is kept small. 2) It automatically assigns appropriate number of small counters to store the frequency of each item.

Techniques II 2 Word acceleration

Techniques II ... e 2.1 Word constraint Assume we hash an item e to k counters   Word Constraint e A machine word L1 L2 ...   Each insertion needs: k memory accesses and k hash computations at layer 1. Each insertion needs: 1 memory access and k+1 hash computations at layer 1.

Techniques II e e 2.2 Word Sharing L3 L3 L2 L2 L1 L1 Word sharing   L3 L3 Word sharing L2 L2 L1 L1 e A machine word e Using this method, we can alleviate the problem of hash collisions.

Techniques II 2.3 One hashing L2 ... L1 ... e A machine word Use one hash function to compute a 32 bit hash value. First 16 bits, locating a word (64 bits) The rest 4*4 bits, locating 4 counters in the word

Techniques III ... ... e Ostrich Policy can be only applied to   3 Ostrich Policy Ostrich Policy can be only applied to CU sketch with Pyramid: PCU.   ...   Without Ostrich policy, the strict insertion strategy of PCU will be slow … … ...   … … When an item e comes ...   … … Just like ostrich, we pretend that there are no parent counters.   … … e

Techniques III ... ... e Using Ostrich Policy, PCU will insert e as …   3 Ostrich Policy Using Ostrich Policy, PCU will insert e as …   ... When an item e comes ...   … … We merely query the three colored counter to get three values. ...   … …   … …   … … e

Techniques III ... ... e Using Ostrich Policy, PCU achieves...   3 Ostrich Policy Using Ostrich Policy, PCU achieves...   ... 1) Speed acceleration: Around one memory access for each insertion.   … … ...   … … 2) Amazingly, accuracy improvement!   … …   … … e

Outline 3. Evaluation 1. Background Experiment setup Accuracy Speed 4. Conclusion 1. Background Problem to address Prior art 2. Four Techniques Counter-pair sharing Word acceleration Word constraint Word sharing One hashing Ostrich policy Here is the outline, including Background, Pyramid Techniques, Evaluation, and Conclusion.

Evaluation Datasets: We use three kinds of datasets as follows. Experiment setup Datasets: We use three kinds of datasets as follows. 1) Real IP-Trace Streams 2) Real-Life Transaction Dataset 3) Synthetic Datasets Implementation: We applied Pyramid to 4 typical sketches. Computation platform: A machine with 12-core CPUs and 62 GB DRAM. CPU has three levels of cache memory: two 32KB L1 caches for each core, one 256KB L2 cache for each core, and one 15MB L3 cache shared by all cores.

Evaluation Accuracy We apply our framework to four typical sketches: CM, CU, Count, and Augmented sketch, and find that the error rate is significantly reduced. And we also find that when applying pyramid to the CU sketch, the accuracy is the best, and thus we compare P_CU with other sketches in the following experiments.

Evaluation Effects of techniques We have proposed five techniques: counter-pair sharing (T1), word constraint (T2), word sharing (T3), one hashing (T4), and Ostrich policy (T5). These figures show that with all our five techniques, the accuracy and speed are both optimized.

Evaluation Accuracy Here we vary the skewness and data ID, and find that, P_CU sketch achieves a much higher accuracy than the four typical sketches.

Evaluation Speed We apply our framework to four typical sketches: CM, CU, Count, and Augmented sketch, and find that the insertion speed and query speed are both improved.

Evaluation Speed Similarly, with different skewness and dataset ID, P_CU achieves a much fewer number of memory accesses than the four typical sketches.

Evaluation Speed Here we vary the skewness and dataset ID, we find that, P_CU sketch achieves a much higher insertion speed and query speed than the four typical sketches.

Outline 3. Evaluation 1. Background Experiment setup Effects of techniques Accuracy Speed 4. Conclusion 1. Background Problem to address Prior art 2. Pyramid Techniques Counter-pair sharing Word acceleration Word constraint Word sharing One hashing Ostrich policy Here is the outline, including Background, Pyramid Techniques, Evaluation, and Conclusion.

Conclusion Sketches have been applied to various fields. In this paper, we propose a sketch framework - the Pyramid sketch, to significantly improve the update speed and accuracy. We applied our framework to four typical sketches: sketches of CM, CU, Count, and Augmented. Experimental results show that our framework significantly improves both accuracy and speed. We believe our framework can be applied to many more sketches.

Thanks! Pyramid Sketch: a Sketch Framework for Frequency Estimation of Data Streams Source codes: http://net.pku.edu.cn/~yangtong/ 18 November 2018 IWQoS 2015

Conclusion Sketches have been applied to various fields. In this paper, we propose a sketch framework - the Pyramid sketch, to significantly improve the update speed and accuracy. We applied our framework to four typical sketches: sketches of CM, CU, Count, and Augmented. Experimental results show that our framework significantly improves both accuracy and speed. We believe our framework can be applied to many more sketches.