anifilter parallel and failure atomic cuckoo filter for
play

AniFilter: Parallel and Failure-Atomic Cuckoo Filter for - PowerPoint PPT Presentation

AniFilter: Parallel and Failure-Atomic Cuckoo Filter for Non-Volatile Memories Hyungjun Oh 1 , Bongki Cho 1 , Changdae Kim 2 , Heejin Park 1 , Jiwon Seo 1 1 2 1 Ou Outline NVM and AMQs Cuckoo Filter Optimizations in AniFilter


  1. AniFilter: Parallel and Failure-Atomic Cuckoo Filter for Non-Volatile Memories Hyungjun Oh 1 , Bongki Cho 1 , Changdae Kim 2 , Heejin Park 1 , Jiwon Seo 1 1 2 1

  2. Ou Outline • NVM and AMQs • Cuckoo Filter • Optimizations in AniFilter • Spillable Buckets • Lookahead Eviction • Bucket Primacy • Logging and Recovery • Evaluation 2

  3. No Non-Vo Volatile Memories • NVM Characteristics • High performance • Persistency • Byte-addressability è Best of both DRAM and SSD (almost) 3

  4. Appr Approxi ximate Membe bershi ship p Que ueries s (AM (AMQs) s) • Approximate set data structures • APIs • Insert(x) – inserts key x into the set • Lookup(x) – lookup key x and returns true or false • Delete(x) – removes key x from the set (optional) • Small false-positives • lookup(x) true when x not in the set 4

  5. NVM VM and AMQs • NVMs are fast, but not as fast as DRAM • Read latency is 2~3x slower than DRAM è DRAM versions of AMQs run slow on NVM • AMQs’ operations are cheap • Insert() and Lookup() need only handful of computation è Cannot use complicated optimization techniques 5

  6. Cu Cuckoo Filter • Fingerprint-based AMQ 0 05A 0F2 0E9 000 1 600 27D 000 000 • Bucketized Cuckoo Filter 2 2F0 000 000 000 è Each bucket has four slots 3 12D A15 1EF AFE è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 1AA 5B0 000 000 5 6

  7. Cu Cuckoo Filter • Fingerprint-based AMQ Bucket 0 05A 0F2 0E9 000 1 600 27D 000 000 • Bucketized Cuckoo Filter … 2 2F0 000 000 000 è Each bucket has four slots 3 12D A15 1EF AFE è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 1AA 5B0 000 000 5 Slots 7

  8. Cu Cuckoo Filter • Fingerprint-based AMQ 0 05A 0F2 0E9 000 H 1 (x) 1 600 27D 000 000 • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x è Each bucket has four slots 3 12D A15 1EF AFE è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 • Insertion (without eviction) 1AA 5B0 000 000 5 8

  9. Cu Cuckoo Filter • Fingerprint-based AMQ 0 05A 0F2 0E9 AC0 H 1 (x) 1 600 27D 000 000 • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x è Each bucket has four slots 3 12D A15 1EF AFE è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 • Insertion (without eviction) 1AA 5B0 000 000 5 9

  10. Cu Cuckoo Filter 0 05A 0F2 0E9 AC0 • Fingerprint-based AMQ H 1 (x) 1 600 27D 000 000 • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x è Each bucket has four slots 3 12D A15 1EF AFE H 2 (x) è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 5 1AA 5B0 000 000 • Insertion (with eviction) 10

  11. Cu Cuckoo Filter 0 05A 0F2 0E9 AC0 • Fingerprint-based AMQ H 1 (x) 1 600 27D 000 000 evicted • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x AFE è Each bucket has four slots 3 12D A15 1EF AFE H 2 (x) è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 5 1AA 5B0 000 000 • Insertion (with eviction) 11

  12. Cu Cuckoo Filter 0 05A 0F2 0E9 AC0 • Fingerprint-based AMQ H 1 (x) 1 600 27D 000 000 evicted • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x AFE è Each bucket has four slots 3 12D A15 1EF FP X H 2 (x) è Two hashes (H 1 , H 2 ) for a bucket index 4 14A FA0 5B0 000 5 1AA 5B0 000 000 • Insertion (with eviction) 12

  13. Cu Cuckoo Filter • Fingerprint-based AMQ 0 05A 0F2 0E9 AC0 H 1 (x) 1 600 27D 000 000 • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x è Each bucket has four slots 3 12D A15 1EF AFE H 2 (x) è Two hashes (H 1 , H 2 ) for a bucket index 14A FA0 5B0 000 4 • Lookup operation 5 1AA 5B0 000 000 13

  14. Cu Cuckoo Filter • Fingerprint-based AMQ 0 05A 0F2 0E9 AC0 H 1 (x) 1 600 27D 000 000 • Bucketized Cuckoo Filter 2 2F0 000 000 000 Key x è Each bucket has four slots 3 12D A15 1EF AFE H 2 (x) è Two hashes (H 1 , H 2 ) for a bucket index 14A FA0 5B0 000 4 • Lookup operation 5 1AA 5B0 000 000 14

  15. Cu Cuckoo Filter r Issu ssue 1) Eviction overhead in high load factors (>75%) • Worse in NVM with higher latency 6 bytes 2) Failure-atomicity issue • Typical setting: 4 slots, 12 bit fingerprints 0 05A 0F2 0E9 AC0 • A bucket is 6 bytes 1 600 27D 000 000 • NVM’s atomic write unit: 8 byte 2 2F0 000 000 000 3 12D A15 1EF AFE 15

  16. Cu Cuckoo Filter r Issu ssue 1) Eviction overhead in high load factors (>75%) • Worse in NVM with higher latency 8 byte boundaries 2) Failure-atomicity issue • Typical setting: 4 slots, 12 bit fingerprints 0 05A 0F2 0E9 AC0 • A bucket is 6 bytes 1 600 27D 000 000 • NVM’s atomic write unit: 8 byte 2 2F0 000 000 000 3 12D A15 1EF AFE 16

  17. Ani AniFilter * • Cuckoo Filter optimized for NVM • Optimization techniques • Spillable Buckets • Lookahead Evictions • Bucket Primacy • Failure-atomic with minimal logging * Anis are in the cuckoo family and have communal nests. 17

  18. Sp Spillable Bu Buckets • Spill a fingerprint in next 2 buckets A0F D1F E49 F8A • Only spill in the first slot 000 27D 2A0 F09 000 000 000 000 000 A15 1EF AFE A4A DA1 EC0 F02 000 5B0 B8A CAC 18

  19. Sp Spillable Bu Buckets • Spill a fingerprint in next 2 buckets A0F D1F E49 F8A • Only spill in the first slot 000 27D 2A0 F09 000 000 000 000 000 A15 1EF AFE Key x A4A DA1 EC0 F02 H 1 (x) 000 5B0 B8A CAC 19

  20. Sp Spillable Bu Buckets • Spill a fingerprint in next 2 buckets A0F D1F E49 F8A • Only spill in the first slot 000 27D 2A0 F09 000 000 000 000 000 A15 1EF AFE Key x A4A DA1 EC0 F02 Spill FP x > 080 B8A 5B0 CAC Swapped to encode spill 20

  21. Sp Spillable Bu Buckets s – Th Theoretic Analysis • Eviction probability with and without Spillable Buckets • Probabilistic model to compute Prob(X=k) 21

  22. Sp Spillable Bu Buckets s – Th Theoretic Analysis • Eviction probability with and without Spillable Buckets • Probabilistic model to compute Prob(X=k) 22

  23. Sp Spillable Bu Buckets s – Th Theoretic Analysis • Eviction probability with and without Spillable Buckets • Probabilistic model to compute Prob(X=k) 23

  24. Sp Spillable Bu Buckets s – Th Theoretic Analysis • Eviction probability with and without Spillable Buckets • Probabilistic model to compute Prob(X=k) 24

  25. Sp Spillable Bu Buckets s – Th Theoretic Analysis • Eviction probability with and without Spillable Buckets • Probabilistic model to compute Prob(X=k) Cuckoo Filter AniFilter 25

  26. Lo Lookahead Ev Eviction • Evict a fingerprint that does not incur further eviction Occupancy flags A0F D1F E49 F8A 1 000 27D 2A0 F09 0 000 000 000 000 0 000 A15 1EF AFE 0 A4A DA1 EC0 F02 1 080 B8A 5B0 CAC 1 26

  27. Bu Bucket Pri rima macy • Primary bucket (H 1 ) and secondary bucket (H 2 ) Swapped to encode overflow > A0F D1F F8A E49 < 1A0 27D 2A0 F09 000 000 000 000 Buckets previously not overflown 000 A15 1EF AFE > A4A DA1 F02 EC0 < 080 B8A 5B0 CAC 27

  28. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets Type A A0F D1F F8A E49 Type B 2A0 27D 000 000 • Requires different # of loggings Type C AC7 000 000 000 • Logging example for Type-B buckets 009 A15 1EF AFE Type A 28

  29. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets • 8-byte logging record 29

  30. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets FP(insert) F A 1 17 0 0 8 E A 1 F 0 1 0 F 0 30

  31. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets FP(insert) F A 1 17 0 0 8 E A 1 F 0 1 0 F 0 17 31

  32. Logging for Lo r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets FP(insert) F A 1 17 0 0 8 E A 1 F 0 1 0 F 0 17 F A 1 32

  33. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets FP(insert) F A 1 17 0 0 8 E A 1 F 0 1 0 F 0 17 F A 1 E A 1 33

  34. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets FP(insert) F A 1 17 0 0 8 E A 1 F 0 1 0 F 0 17 F A 1 E E A 1 34

  35. Lo Logging for r Failure Atomi micity • Type-A, -B, -C buckets • Requires different # of loggings • Logging example for Type-B buckets FP(insert) F A 1 17 0 0 8 E A 1 F 0 1 0 F 0 17 F A 1 E A 1 E 0 0 00 35

  36. Re Recovery 1. Check log record and read FP i , FP e , and bucket B 2. Test if FP i and FP e are in B a) FP e ∈ B and FP i ∈ B b) FP e ∉ B and FP i ∉ B c) FP e ∈ B and FP i ∉ B d) FP e ∉ B and FP i ∉ B 3. For (a), (b), (c) insertion is incomplete For (d) examine meta-data in log record è Example recovery process for (d) 36

  37. Re Recovery – Ex Exampl ple Write a log record 1 0 0 8 E A 1 F 0 1 0 F 0 17 FA1 EA1 E 0 0 00 37

Recommend


More recommend