Beyond Bloom Filters- Approximate Concurrent State Machines.ppt
《Beyond Bloom Filters- Approximate Concurrent State Machines.ppt》由会员分享,可在线阅读,更多相关《Beyond Bloom Filters- Approximate Concurrent State Machines.ppt(43页珍藏版)》请在麦多课文档分享上搜索。
1、Beyond Bloom Filters: Approximate Concurrent State Machines,Michael Mitzenmacher Joint work with Flavio Bonomi, Rina Panigrahy, Sushil Singh, George Varghese,Goals of the Talk,Survey some of my recent work on Bloom filters and related hashing-based data structures. But lots of other people currently
2、 working in this area an area of research in full bloom. Highlight: new results from SIGCOMM, ESA, Allerton 2006. For more technical details and experimental results, see papers at my home page.,Motivation: Router State Problem,Suppose each flow has a state to be tracked. Applications: Intrusion det
3、ection Quality of service Distinguishing P2P traffic Video congestion control Potentially, lots of others! Want to track state for each flow. But compactly; routers have small space. Flow IDs can be 100 bits. Cant keep a big lookup table for hundreds of thousands or millions of flows!,Approximate Co
4、ncurrent State Machines,Model for ACSMs We have underlying state machine, states 1X. Lots of concurrent flows. Want to track state per flow. Dynamic: Need to insert new flows and delete terminating flows. Can allow some errors. Space, hardware-level simplicity are key.,Problems to Be Dealt With,Keep
5、ing state values with small space, small probability of errors. Handling deletions. Graceful reaction to adverarial/erroneous behavior. Invalid transitions. Non-terminating flows. Could fill structure if not eventually removed. Useful to consider data structures in well-behaved systems and ill-behav
6、ed systems.,Results,Comparison of multiple ACSM proposals. Based on Bloom filters, d-left hashing, fingerprints. Surprisingly, d-left hashing much better! Experimental evaluation. Validates theoretical evaluation. Demonstrates viability for real systems. New construction for Bloom filters. New d-lef
7、t counting Bloom filter structure. Factor of 2 or better in terms of space.,Review: Bloom Filters,Given a set S = x1,x2,x3,xn on a universe U, want to answer queries of the form:Bloom filter provides an answer in “Constant” time (time to hash). Small amount of space. But with some probability of bei
8、ng wrong. Alternative to hashing with interesting tradeoffs.,Bloom Filters,Start with an m bit array, filled with 0s.,Hash each item xj in S k times. If Hi(xj) = a, set Ba = 1.,To check if y is in S, check B at Hi(y). All k values must be 1.,Possible to have a false positive; all k values are 1, but
9、 y is not in S.,n items m = cn bits k hash functions,False Positive Probability,Pr(specific bit of filter is 0) isIf r is fraction of 0 bits in the filter then false positive probability is Approximations valid as r is concentrated around Er. Martingale argument suffices. Find optimal at k = (ln 2)m
10、/n by calculus. So optimal fpp is about (0.6185)m/n,n items m = cn bits k hash functions,Example,m/n = 8,Opt k = 8 ln 2 = 5.45.,n items m = cn bits k hash functions,Handling Deletions,Bloom filters can handle insertions, but not deletions.If deleting xi means resetting 1s to 0s, then deleting xi wil
11、l “delete” xj.,0,1,0,0,1,0,1,0,0,1,1,1,0,1,1,0,B,xi xj,Counting Bloom Filters,Start with an m bit array, filled with 0s.,Hash each item xj in S k times. If Hi(xj) = a, add 1 to Ba.,To delete xj decrement the corresponding counters.,Can obtain a corresponding Bloom filter by reducing to 0/1.,Counting
12、 Bloom Filters: Overflow,Must choose counters large enough to avoid overflow. Poisson approximation suggests 4 bits/counter. Average load using k = (ln 2)m/n counters is ln 2. Probability a counter has load at least 16:Failsafes possible. We assume 4 bits/counter for comparisons.,ACSM Basics,Operati
13、ons Insert new flow, state Modify flow state Delete a flow Lookup flow state Errors False positive: return state for non-extant flow False negative: no state for an extant flow False return: return wrong state for an extant flow Dont know: return dont know Dont know may be better than other types of
14、 errors for many applications, e.g., slow path vs. fast path.,ACSM via Counting Bloom Filters,Dynamically track a set of current (FlowID,FlowState) pairs using a CBF. Consider first when system is well-behaved. Insertion easy. Lookups, deletions, modifications are easy when current state is given. I
15、f not, have to search over all possible states. Slow, and can lead to dont knows for lookups, other errors for deletions.,Direct Bloom Filter (DBF) Example,0,0,1,0,2,3,0,0,2,1,0,1,1,2,0,0,0,0,0,0,1,3,0,0,3,1,1,1,1,2,0,0,Timing-Based Deletion,Motivation: Try to turn non-terminating flow problem into
16、an advantage. Add a 1-bit flag to each cell, and a timer. If a cell is not “touched” in a phase, 0 it out. Non-terminating flows eventually zeroed. Counters can be smaller or non-existent; since deletions occur via timing. Timing-based deletion required for all of our schemes.,Timer Example,3,0,0,2,
17、1,0,1,1,1,0,0,0,1,0,1,0,3,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,RESET,Timer bits,Stateful Bloom Filters,Each flow hashed to k cells, like a Bloom filter. Each cell stores a state. If two flows collide at a cell, cell takes on dont know value. On lookup, as long as one cell has a state value, and there are n
18、ot contradicting state values, return state. Deletions handled by timing mechanism (or counters in well-behaved systems). Similar in spirit to KM, Bloom filter summaries for multiple choice hash tables.,Stateful Bloom Filter (SBF) Example,1,4,3,4,3,3,0,0,2,1,0,1,4,?,0,2,1,4,5,4,5,3,0,0,2,1,0,1,4,?,0
19、,2,What We Need : A New Design,These Bloom filter generalizations were not doing the job. Poor performance experimentally. Maybe we need a new design for Bloom filters! In real life, things went the other way; we designed a new ACSM structure, and found that it led to a new Bloom filter design.,Inte
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- BEYONDBLOOMFILTERSAPPROXIMATECONCURRENTSTATEMACHINESPPT

链接地址:http://www.mydoc123.com/p-378926.html