SILT: A Memory-Efficient, High-Performance Key-Value Store
1. SILT: A Memory-Efficient, High-Performance
Key-Value Store
Hyeontaek Lim, Bin Fan, David G. Andersen, Michael Kaminsky
Carnegie Mellon University, Intel Labs
1
2. Outline
1- Introduction.
2- Problem statement.
3. Contributions.
4- Experiments
5- Results and conclusion
This template is free to use under Creative Commons Attribution license. If you use the graphic assets (photos,
icons and typographies) provided with this presentation you must keep the Credits slide.
2
3. Hello!
I am Mahdi Atawneh
You can find me at:
@mshanak
mahdi@ppu.edu
3
5. What is key-value store ?
a data storage paradigm designed for storing, retrieving, and
managing associative arrays,
5
Introduction
6. Ecommerce (Amazon)
Picture stores (facebook)
Web object caching.
6
key-value stores used in:
7. Many projects have examined flash memory-based key-value
stores ; Faster than disk, cheaper than DRAM
7
DRAM vs Flash
RAM (main memory)
a bit more expensive .
requires constant power.
is much faster.
Flash memory (HD)
low-cost .
retains data when power is
removed (nonvolatile),
but its performance is also slow.
8. Memory overhead: Index size per entry, Ideally 0 (no
memory overhead)
Read amplification: Flash reads per query, Limits query
throughput, Ideally 1 (no wasted flash reads).
Write amplification: Flash writes per entry, Limits insert
throughput, Also reduces flash life expectancy
8
Three Metrics to Minimize
10. Motivation
As key-value stores scale in both size and importance,
index memory efficiency is increasingly becoming one of the
most important factors for the system’s scalability and overall cost
effectiveness.
10
12. Related Work
Many studies tried to reduce in-
memory index overhead,but:
• there solutions either require
more memory.
• or keeping parts of there index on
disk (low performance "called read
amplification")
12
14. Contributions
1. The design and implementation of three basic key-value stores
(LogStore, HashStore, and SortedStore) .
2. Synthesis of these basic stores to build SILT.
3. An analytic model that enables an explicit and careful balance
between memory, storage, and computation .
14
15. Contributions
1. The design and implementation of three basic key-value stores
(LogStore, HashStore, and SortedStore) .
2. Synthesis of these basic stores to build SILT.
3. An analytic model that enables an explicit and careful balance
between memory, storage, and computation .
15
18. SILT: 1. LogStore
1. Write friendly key-value store.
2. Use a tag (15 bits) for an index rather than an entire hash
index (160bits) .
3. A customized version of Cuckoo hashing is used.
4. In-memory hash table to map contents in flash.
5. Only one instance.
18
20. SILT: 1. LogStore
K2
h1(k2)
Tag Offset
DRAM (memory)
** store short tag (15b)
FLASH (hard disk)
** store the full key (160)
h2(k2)
1 2 3 4
Cuckoo hashing
20
21. SILT: 1. LogStore
K2
h1(k2)
Tag Offset
h2(k2
)
1
K2
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k2)
1 2 3 4
21
22. SILT: 1. LogStore
K1
h1(k1)
Tag Offset
h2(k2
)
1
h1(k1
)
2
K2 K1
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k1)
1 2 3 4
22
23. SILT: 1. LogStore
K4
h1(k2)
Tag Offset
h2(k2
)
1
h1(k4
)
3
h1(k1
)
2
K2 K1 K4
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k2)
1 2 3 4
23
24. SILT: 1. LogStore
K3
h1(k3)
Tag Offset
h2(k2
)
1
h1(k4
)
3
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k3)
1 2 3 4
24
25. SILT: 1. LogStore
K3
h1(k3)
Tag Offset
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k3)
1 2 3 4
25
26. SILT: 1. LogStore
K3
h1(k3)
Tag Offset
h2(k3
)
4
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k3)
1 2 3 4
26
27. SILT: 1. LogStore
K5
? h1(k5)
Tag Offset
h2(k3
)
4
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k5)
1 2 3 4
27
28. SILT: 1. LogStore
K5
? h1(k5)
Tag Offset
h2(k3
)
4
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k5)
1 2 3 4
28
29. SILT: 1. LogStore
K5
? h1(k5)
Tag Offset
h2(k3
)
4
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
h2(k5)
1 2 3 4LogStore is full?
1. SILT freezes the LogStore
2. initializes a new one without expensive rehashing.
3. Convert the old LogStore to a HashStore ( in background).
29
31. SILT: 2. HashStore
1. Convert logStore into a more memory-efficient data structure.
2. Sort the LogStore based on ‘HashOrder’
3. Saves lots of in-memory by eliminating the index and reordering
the on-flash pairs from insertion order to hash-order
31
33. SILT: 2. HashStore
Tag Offset
h2(k3
)
4
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
1 2 3 4
Convert logStore into a more memory-efficient data structure..
33
34. SILT: 2. HashStore
Tag Offset
h2(k3
)
4
h1(k4
)
3
h2(k2
)
1
h1(k1
)
2
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
1 2 3 4
Convert logStore into a more memory-efficient data structure..
1. Remove the Offset
column
34
36. SILT: 2. HashStore
Tag
h2(k3
)
h1(k4
)
h2(k2
)
h1(k1
)
K2 K1 K4 K3
DRAM (memory)
** store short tag
FLASH (hard disk)
** store the full key (160)
1 2 3 4
Convert logStore into a more memory-efficient data structure..
2. Sort according to
the hash
36
40. SILT: 3. SortedStore
Multiple HashStore can be aggregated into one SortedStore.
Focuses on minimize the bit presentation (by Using Sorted Data
on Flash).
From the sorted results, indices are re-made ( trie data structure ,
uses 0.4 bytes of index memory per key on average).
keeps read amplification low (exactly 1) by directly pointing to the
correct location on flash.
40
41. SILT: 3. SortedStore
Indexing Sorted Data with a Trie:
leaf = key
internal node = common prefix of the
keys represented by its descendants
How it works?
41
54. SortedStore uses a compact recursive
representation to eliminate pointers
54
55. SLIT Lookup Process
Queries look up stores in sequence (from new to old)
Note : Inserts only go to Log
55
56. SLIT Lookup Process
Queries look up stores in sequence (from new to old)
Note : Inserts only go to Log
56
57. Contributions
1. The design and implementation of three basic key-value stores
(LogStore, HashStore, and SortedStore) .
2. Synthesis of these basic stores to build SILT.
3. An analytic model that enables an explicit and careful balance
between memory, storage, and computation .
57
58. Contributions
1. The design and implementation of three basic key-value stores
(LogStore, HashStore, and SortedStore) .
2. Synthesis of these basic stores to build SILT.
3. An analytic model that enables an explicit and careful balance
between memory, storage, and computation .
58
59. Analytic model
59
Memory overhead (MA)=
Read amplification (RA)=
Write amplification (WA)=
data written to flash
data written by application
data read from flash
data read by application
total memory consumed
number of items