μ-ftl: a memory-efficient flash translation layer supporting
TRANSCRIPT
μ-FTL: A Memory-Efficient Flash Translation Layer
Supporting Multiple Mapping Granularities
Yong-Goo Lee
Computer Architecture Laboratory
Korea Advanced Institute of Science and Technology (KAIST)
South Korea
Introduction
Flash Memory
Flash Memory
2
Advantages of NAND Flash Memory
• Non-volatility
• Short read/write latency
• Low power consumption
• Small size and light weight
• Solid state reliability
3
NAND Flash Memory Characteristics
4
page A A’
• A unit of NAND flash memory operation– Page: a read/write unit (4KB)– Block: an erase unit (512KB)
• Erase-before-write – A page once written cannot be overwritten until it is
erased
NAND flash memoryblock
Flash Translation Layer
• Legacy disk-based host systems cannot be directly used with NAND flash memory
• FTL translates a logical address used by the host into a physical address in NAND flash memory
• Two major factors affecting the performance of FTL– Address mapping mechanism– Garbage collection policy
5
FTLFTL
NAND Flash memoryNAND Flash memory
Host system (file system, device
driver)
Host system (file system, device
driver)
Logical address
Physical address
Motivation
6
RAM usage
Main Ideas of μ-FTL
7
Workload Characteristics
• Multiple mapping granularities– Reducing both the RAM usage and the overhead– Using μ-Tree as a main data-structure
8
Characteristic (write requests)
ExampleAppropriate
mapping granularity
Small & Random
File system meta dataTemporary Internet files
Fine-grained
Large & Sequential
Multimedia filesInstalled applications
Coarse-grained
μ-Tree [D. Kang, EMSOFT 2007]• Handling any insertion/deletion/update operation of the tree
with only one flash write operation– By storing multiple nodes from the leaf to the root in a single page
9
LRUhead
μ-Tree cache
cache miss
cache full (dirty pages
only)
AA
BB CC
DD EE FF
A’A’
C’C’
F’F’
A
B C
D E F
A
B C
D E F F’
A
B C C’
D E F F’
A A’
B C C’
D E F F’
μ-Tree block
Address Mapping
• μ-FTL implements multiple mapping granularities– Extent: A variable-sized mapping entry (a pair of key and record)
10
Logical blocks
Physical blocks 55
00 44 55 66
100,4
100,4
105,1
105,1
104,1
104,1
106,2
106,2
KeyRecord
μ-FTL mapping example
The implementation of mapping example
100100101101102102103103
104104105105106106107107
00112233
44556677
Main Ideas of μ-FTL
11
Garbage Collection
• Victim selection policy– Having the largest # of invalid pages
• Garbage collection information– Per-block invalid page counter
• Maintaining the number of invalid pages in each physical block
– Bitmap information• Distinguishing valid pages from invalid pages
12
55 2525
Bitmap Information
• Bitmap information is too large to be stored in RAM• We store the bitmap information in μ-tree
13
00 44 55 66
100,4
100,4
105,1
105,1
104,1
104,1
106,2
106,2
Physical blocks100100101101102102103103
104104105105106106107107
2525 2626
(0001)2
(0001)2
(1111)2
(1111)2
Key (bitmap)
Record
1 125 26
Key (mapping)
1
Bitmap Cache
• The μ-Tree cache is polluted by bitmap entries– The cache hit ratio of extents severely impaired
• Bitmap cache– A hash table structure
for buffering bitmap updates
– Invalid extent• Physically adjacent
invalid pages
14
(Physical Page Number, Length)
Pointer
Invalid Extent
Main Ideas of μ-FTL
15
Logical Address Space Partitioning
16
A global update block
Many update blocks for each partition
Logical address space
Logical address space
• Separating hot data from cold data has a beneficial effect on the performance of an FTL
• Each part of the logical address space exhibits different degree of “hotness”
• Update block– being charged for receiving data from incoming write requests
Main Ideas of μ-FTL
17
μ-FTL Design Summary
18
WriteWrite
Bitmap
Cache
Bitmap
Cacheμ-Tree Cache
μ-Tree Cache
Partition 1
Partition 2
Partition 3
Partition 4μ-Tree
Free block list
Data
Extentupdate
Bitmapupdate
Bitmap update flush
Cachefull
Cache miss
Evaluation Methodology
• Trace-driven simulators for several FTLs– Block-mapped: the log block, FAST, the super block– Page-mapped: DAC
• 6 traces – 3 multimedia traces: PIC(8GB), MP3(8GB), MOV(8GB)
– 3 PC traces: WEB(32GB), GENERAL(32GB), SYSMARK(40GB)
• The standard configurations
19
Partition Size Bitmap cache sizeThe portion of extra blocks
256MB (512 logical blocks)
4KB for multimedia traces32KB for PC traces
3%
The RAM Usage
Block-mapped FTL
μ-FTL (A+B+C)Page-mapped
FTL
8GB 64KB16KB+44KB+4KB
= 64KB8MB
32GB 256KB64KB+160KB+32KB
= 256KB32MB
40GB 320KB80KB+208KB+32KB
= 320KB40MB
20
(A) Per-block invalid page counter (B) The μ-Tree cache size(C) The bitmap cache size
The Comparison of FTL Performance
21
GENERAL (32GB) SYSMARK (40GB)
56.8% 89.7%
The Effect of Bitmap Cache Size
22
WEB (32GB) PIC (8GB)
52.5%33.3%
μ-Tree cache overhead
The Effect of Partitioning
23
WEB (32GB) GENERAL (32GB)
23.6% 39.6%
Conclusion
• μ-FTL – Small and fixed RAM usage
• As small as block-mapped FTLs
– Low management overhead• As low as DAC (a page-mapped FTL)
24
Thank you for listening
25