trading flash translation layer for performance and lifetime 王 江 涛王 江 涛

33
Trading Flash Translation Layer For Performance and Lifetime 王 王 王

Upload: marianna-poock

Post on 14-Dec-2015

323 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

Trading Flash Translation Layer For Performance and Lifetime

王 江 涛

Page 2: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

2

Introduction

Outline

1

Flash Translation Layer2

Address Mapping3

Wear Leveling4

5 Conclusion

Page 3: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

3

Introduction of Flash Memory

• Pros Small size and Lighter weight Low power consumption and Non-Volatility Shock resistance and Lesser noise Faster access performance

Page 4: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

4

flash memory chip

OOBECC(Hamming Code)Logical page numberState:

erased/valid/invalid

DATA

OOB

Page 5: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

5

Introduction of Flash Memory

Cons Write granularity (page) Erase before write (block) Sequential write within a block Limited erase/write

Out-of-place update when a page is to be overwritten, we allocate a new free

or erased page we used a software layer called FTL indicate the

physical location change of the page

Page 6: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

6

Introduction

Outline

1

Flash Translation Layer2

Address Mapping3

Wear Leveling4

5 Conclusion

Page 7: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

7

Flash Translation Layer

Function Address mapping Garbage collection(block reclamation) Wear-leveling

Page 8: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

8

Introduction

Outline

1

Flash Translation Layer2

Address Mapping3

Wear Leveling4

5 Conclusion

Page 9: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

9

Address Mapping

• Block-level FTL Scheme The same page offset within logical and physical block Mapping table reside in RAM (size is small) Erase operation frequent and space utilization is low

• Mapping granularity Page-level scheme Block-level scheme Hybrid scheme

Page 10: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

10

Address Mapping

• Hybrid FTL Scheme DBA: store user data (block-level mapping) LBA: store overwriting data (page-level mapping)

Page 11: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

11

Address Mapping

• Page-level FTL Scheme A logical page number can be mapped into any page Mapping table stored in SRAM[1995] Mapping table is stored in Flash and cached in

SRAM[2009]

Page 12: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

12

Page-level FTL Scheme

• Related work DFTL:A Flash Translation Layer Employing Demand-based

Selective Caching of Page-level Address Mapping. (ASPLOS 2009)

A Workload-Aware Adaptive Hybrid Flash Translation Layer with an Efficient Caching Strategy (CFTL)

(MASCOTS 2011)

LazyFTL: A Page-level Flash Translation Layer Optimized for NAND Flash Memory

(SIGMOD 2011)

Page 13: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

13

DFTL

• Divided flash memory into MBA and DBA MBA--Store the full mapping table on flash DBA—Store user data

• Use page-level mapping• Dynamically swap page-level mapping entries

in/out SRAM

Page 14: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

14

DFTL

SRAM

CMT: Caching Mapping TableGMD: Global Mapping DirectoryLPN : logical page numberPPN: physical page number

Page 15: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

15

DFTL

Pros Realize sequential program within a block Avoid full merge

Cons Frequently update the mapping pages during

garbage collection A poor reliability of mapping information The cost of read is large

Page 16: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

16

Workload-Aware Adaptive FTL(CFTL)

• Divided flash memory into MBA and DBA MBA--Store the full mapping on flash DBA—Store user data

• Use page-level mapping and block-level mapping• Dynamically swap page-level mapping entries in/out

SRAM

• Convert to each other based on data access patterns Read intensive: Block-level mapping Write intensive: Page-level mapping

Page 17: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

17

Workload-Aware Adaptive FTL(CFTL)

Pros Realize sequential program within a block Avoid full merge Exploit temporal and spatial locality and workloads Improve the performance of read

Cons Frequently update the mapping pages during garbage

collection A poor reliability of mapping information Expensive read/write cost to build block mapping table

Page 18: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

18

LazyFTL

DBA: store user dataMBA: store mapping pages(page-level scheme)CBA: store valid user data when implement garbage

collectionUBA: Implement write requests

Page 19: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

19

LazyFTL

Write Complete a write request in the UBA Store new mapping formation in RAM ( UMT: update mapping table )

Garbage CollectionReclaim a victim block in the DBA or the MBAMove valid data pages to CBA and store new mapping formation in RAM (UMT)

ConvertImplement a batch updatesConvert CBA/UBA to DBA

Page 20: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

20

LazyFTL

Page 21: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

21

Convert Algorithm

Page 22: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

22

Performance Evaluation

Page 23: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

23

LazyFTL

• Pros Adopt an update buffer to decrease frequently update

the mapping pages Achieve consistency and reliability Improve write performance by reduce erase operation

• Cons Increase the cost of read operation Decrease speedup of garbage collectionNot considering hot-cold data for wear leveling

Page 24: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

24

Introduction

Outline

1

Flash Translation Layer2

Address Mapping3

Wear Leveling4

5 Conclusion

Page 25: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

25

Wear Leveling

• Introduction Any one part of flash memory can only withstand a

limited number of erase-write cycles Localities of data access inevitably degrade wear

evenness in flash

• Some definitions Hot data block and cold data block (access frequency) Old block and young block (erase counts)

• Basic principle Prevent old blocks from being erased(cool down) Start erasing young blocks actively(heat up)

Page 26: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

26

Wear Leveling

Cold data migration move cold data from young blocks to old blocks Select young blocks when execute garbage collection

• Related work(Hybrid FTL Scheme) A Low-Cost Wear-Leveling Algorithm for Block-Mapping Solid-

State Disks (lazy scheme) (LCTES2011)

Page 27: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

27

Lazy Scheme

• Recency Update recency ( a logical block ) the time length since the latest update to a logical block Erase recency ( a physical block )the time length since the latest erase operation on a

physical block

• Frequency Elder block larger than the average erase count Junior block smaller than the average erase count

• OverviewCold data migration Consider recency (recent wear history ) and

frequency

Page 28: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

28

Lazy Scheme

The goal of wear-leveling is that a block should keep its erase count close to the average.For junior block, we are interested in Block e and f.For elder block, we are interested in block a and b.We need to move valid data in block e and f to block a and bRe-map e and f to a and b and select Block e and f as victim blocks

Page 29: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

29

Algorithm

Page 30: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

30

Lazy Scheme

• Prosdoes not store wear information in RAM, but leaves all of

this information in flash instead.utilizes the address-mapping information available and

do not need to add extra data structures for wear leveling

Cons It is important to uniformly visit every logical block

when selecting a logical block for re-mapping.

Page 31: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

31

Introduction

Outline

1

Flash Translation Layer2

Address Mapping3

Wear Leveling4

5 Conclusion

Page 32: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

32

Conclusion

• Conclusion Page mapping scheme shows the best performance in

that it can decrease erase operations It is necessary to design an efficient wear leveling

scheme for Page-Mapping Solid-State disks Some operations in FTL can be executed without

interrupting current flash accesses by exploiting internal parallelism of flash memory

As write caching to reduce erase operation SSD for primary storage, auxiliary PCM

Page 33: Trading Flash Translation Layer For Performance and Lifetime 王 江 涛王 江 涛

Thank you