Don’t Thrash: How to Cache Your Hash in Flash
M.A. Bender, M. Farach-Colton, R. Johnson, B.C. Kuszmaul, D. Medjedovic, P. Montes,
- P. Shetty, R. P. Spillane, E. Zadok
Dont Thrash: How to Cache Your Hash in Flash M.A. Bender, M. - - PowerPoint PPT Presentation
Dont Thrash: How to Cache Your Hash in Flash M.A. Bender, M. Farach-Colton, R. Johnson, B.C. Kuszmaul, D. Medjedovic, P. Montes , P. Shetty, R. P. Spillane , E. Zadok Stony Brook U., Rutgers U., MIT, TokuTek Bloom Filter Cache (e.g., RAM)
Don't Thrash: How to Cache Your Hash in Flash
2
Elements stored in the Bloom filter Bit-array Each element is hashed To K positions in the bit-array. Here k=2
Don't Thrash: How to Cache Your Hash in Flash
3
k
lookup
B h
1(D)
[ ] = 0
B h2(D)
[ ] =1
False positive
(C was never inserted)
Don't Thrash: How to Cache Your Hash in Flash
4
Don't Thrash: How to Cache Your Hash in Flash
5
Random writes
Don't Thrash: How to Cache Your Hash in Flash
6
Don't Thrash: How to Cache Your Hash in Flash
7
Random Writes
Don't Thrash: How to Cache Your Hash in Flash
8
Now just one random write, not K
Don't Thrash: How to Cache Your Hash in Flash
9
We write 5 bits with
Don't Thrash: How to Cache Your Hash in Flash
10
Don't Thrash: How to Cache Your Hash in Flash
11
Don't Thrash: How to Cache Your Hash in Flash
12
Don't Thrash: How to Cache Your Hash in Flash
13
Lookup 8 No No Found 2 Previously flushed buffers Buffers are merged to keep total number of buffers low £ logN é ê ù ú
Don't Thrash: How to Cache Your Hash in Flash
14
Don't Thrash: How to Cache Your Hash in Flash
15
Don't Thrash: How to Cache Your Hash in Flash
16
r-bit array r=3 h(A)=00:101 h(B)=10:110 00 01 10 11 address:identity Q[10]=110 2 or 3 MD bits per element
Don't Thrash: How to Cache Your Hash in Flash
17
r-bit array r=3 h(B)=10:110 00 01 10 11
h(D)=10:111 h(C)=01:010 h(E)=10:110 False positive
(E was never inserted)
Soft collision
(push D to the side, use a few MD bits to remember)
pFP x
( ) £a 1
2r
size =a-1 r + MD
( )2q
h(A)=00:101
Don't Thrash: How to Cache Your Hash in Flash
18
r-bit array r=3 00 01 10 11
00:101=5 10:110=22 10:111=23
Don't Thrash: How to Cache Your Hash in Flash
19
00 00:101=5 10:110=22 001:01=5
r-bit array r=2 101:10=22 000 001 010 011 100
101 110 111 10:111=23 101:11=23
01
10
11
00
01
10
11
r-bit arrays r=3
Don't Thrash: How to Cache Your Hash in Flash
20
£ logN é ê ù ú
Don't Thrash: How to Cache Your Hash in Flash
21
Don't Thrash: How to Cache Your Hash in Flash
22
1E+09 2E+09 3E+09 4E+09 5E+09 6E+09 7E+09 8E+09 9E+09 2000 4000 6000 8000 10000 12000 14000
Large Merges Thruput much higher: 40x higher than BBF 3000x higher than BF Seconds Number of Fingerprints Inserted Peak append thruput: 8.4MB/S
Don't Thrash: How to Cache Your Hash in Flash
23
1 10 100 1000 10000
CF Traditional BF Elevator BF 530 lkus/sec 1600 lkus/sec 1600 lkus/sec Lookup Throughput 1/3x
Don't Thrash: How to Cache Your Hash in Flash
24
Don't Thrash: How to Cache Your Hash in Flash
25
Don't Thrash: How to Cache Your Hash in Flash
26
Don't Thrash: How to Cache Your Hash in Flash
27
1 10 100 1000 10000 100000 1000000
CF Traditional BF Elevator BF 670,000 ins/sec 200 ins/sec 17000 ins/sec Insertion Throughput 40x 3000x
Don't Thrash: How to Cache Your Hash in Flash
28
Don't Thrash: How to Cache Your Hash in Flash
29