μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

25
μ-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

Transcript of μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Page 1: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

μ-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

Page 2: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Introduction

Flash Memory

Flash Memory

2

Page 3: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Advantages of NAND Flash Memory

• Non-volatility

• Short read/write latency

• Low power consumption

• Small size and light weight

• Solid state reliability

3

Page 4: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 5: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 6: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Motivation

6

RAM usage

Page 7: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Main Ideas of μ-FTL

7

Page 8: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 9: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

μ-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

Page 10: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 11: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Main Ideas of μ-FTL

11

Page 12: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 13: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 14: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 15: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Main Ideas of μ-FTL

15

Page 16: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 17: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Main Ideas of μ-FTL

17

Page 18: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

μ-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

Page 19: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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%

Page 20: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 21: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

The Comparison of FTL Performance

21

GENERAL (32GB) SYSMARK (40GB)

56.8% 89.7%

Page 22: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

The Effect of Bitmap Cache Size

22

WEB (32GB) PIC (8GB)

52.5%33.3%

μ-Tree cache overhead

Page 23: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

The Effect of Partitioning

23

WEB (32GB) GENERAL (32GB)

23.6% 39.6%

Page 24: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

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

Page 25: μ-FTL: A Memory-Efficient Flash Translation Layer Supporting ...

Thank you for listening

25