31
Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with Minimized Overhead Muthukumar Murugan and David H.C. Du

Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

Embed Size (px)

Citation preview

Page 1: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with 

Minimized Overhead

Muthukumar Murugan and David H.C. Du

Page 2: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

2

NAND flash memory – BackgroundWear leveling – BackgroundMotivation Rejuvenator – DesignAdaptability in RejuvenatorEvaluation Conclusion

Agenda

Page 3: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

3

Background:  NAND Flash Memory

An array of flash blocksRead/write in page unitsTypical block = 128K;page = 2K or 4KMust erase block before writeRead = 25microsecondsWrite = 200microsecondsErase = 1500 microsecondsLimited number of erasesper block‐ 100K for SLC‐ 10K for MLC

Flash Translation Layer

Page

… …

Block Page

PageWrite

BlockErase

PageRead

LBAWrite

LBA ReadAddress

MappingWear Leveling

Garbage Collection

Page 4: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

4

Background:  Wear Leveling

Frequently written blocks wear out faster Need to balance wear in blocksDynamic Wear leveling : ‐Write “hot”  data to blocks that   have lesser erase counts‐Write “cold” data to blocks that  have higher erase counts

Issue : Cold data remains stale in a few blocks !

Page 5: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

5

Background:   Static Wear Leveling

Static wear leveling ‐ Moves stale cold data around periodically 

• Rejuvenator‐ Static wear leveling algorithm‐ Comprehensive design WL, GC and FTL components

Least worn blocks

Cold Data

Most worn blocks

Can we improve lifetime of flash memory with minimum impact on

performance ?

Page 6: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

6

• General wear leveling goals : ‐ Improve lifetime of flash memory ‐ Reduce variance in erase counts of blocks

• Rejuvenator goals : ‐ Prevent a single block from reaching its lifetime    faster than other blocks‐ Reduce write amplification due to static cold data  migration      

‐ Do static cold data migration judiciously ! ‐ Adapt to changing workloads and rate of increase in erase counts

Motivation

Page 7: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

7

• TrueFFS: ‐ Virtual erase units mapped to chain of physical erase units

‐ Folding changes mapping to one physical erase unit• Static wear leveling done periodically • Valid data in the chain copied to one physical erase unit 

Existing wear leveling algorithms

Observation : High variance in erase counts

Page 8: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

8

• Dual Pool : ‐ Two pools of blocks :  hot and cold‐ Hotness of  block based on erase count

• Coarse grained control of blocks • Threshold based static wear leveling 

‐ Swap data between oldest and youngest blocks • No explicit hot data identification 

Existing wear leveling algorithms

Observation : More than necessary data migrations due to constant threshold

Page 9: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

9

Can we control variance in erase counts with just enough cold data migrations ?

Page 10: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

10

Rejuvenator – Design 

Page 11: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

11

Rejuvenator : Overview

• Maintain lists of blocks based on erase count

• Initially all blocks associated with list 0 0

Lists Blocks

Page 12: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

12

Rejuvenator : Overview

• Maintain lists of blocks based on erase count

• Initially all blocks associated with list 0

• As blocks are erased they get associated to higher lists

• Difference between minimum and maximum erase count is      

diff = max_wear – min_wear       diff  ≤ Ƭ‐1

Lists Blocks

min_wear

....

min_wear + (m-1)

....

max_wear

Page 13: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

13

Rejuvenator : Mapping

0

Lists Blocks

....

min_wear

....

min_wear + (m-1)

....

max_wear

....

100K

“m” lower numbered lists

“(Ƭ-m)” higher numbered lists

Hot data, Page Level Mapping

Cold data, Block Level Mapping

Page 14: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

14

Rejuvenator : Hot data Identification 

• Account for recency and frequency

• LRU list with reference counts• Window size : 1024• Hot : Most frequently written 

LBAs• Any LBA having ref. count 

>  Average reference count is hot

LBA Ref. CountMRU

LRU

Evicted LBA

Page 15: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

15

Rejuvenator : Handling WritesLBA Write

Hot? Hot?

Write to lower lists, Update page map

Write to higher lists, Update block map

Yes NoHas Page

Level Map ?

Yes No NoYes

Write to lower lists, Update page map

Write to higher lists, Update block map

Page 16: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

16

Rejuvenator : Data Migrations

• Sliding window size ≤ Ƭ• Window movement restricted

at - Top : Cold data

accumulation in lower lists

min_wear

min_wear + m

max_wear

.

.

.

Cold data

diff = Ƭ - 1

Page 17: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

17

Rejuvenator : Data Migrations

• Sliding window size ≤ Ƭ• Window movement restricted

at - Bottom: Invalid blocks accumulate in list min_wear +(Ƭ-1)

min_wear

min_wear + 1

min_wear + (m-1)

.

.

.

Hot/Cold data

Very Rare !

diff = Ƭ - 1

Page 18: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

18

Rejuvenator : Garbage Collection • Garbage collection 

‐ Copy valid pages of blocks elsewhere‐ Erase current block 

No. of clean and invalid pagesCleaning Efficiency   =    _________________________

of block                              Total Number of pages 

• Garbage collection starts in lower numbered lists• Intuitively : 

‐ Lower numbered lists have lesser erase counts‐ Contain more invalid pages and hence better cleaning efficiency

Enable efficient GC via intelligent wear leveling

Page 19: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

19

Adaptability

Page 20: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

20

Impact of the value of Ƭ

• Larger value of Ƭ ‐ Large variance in erase counts

• Smaller value of Ƭ  ‐ Static cold data migration is done more often 

• Goal : Strike a balance between the two• Adapt the value of Ƭ   depending on lifetime of flash 

memory • Tighten the  constraints on variance of erase counts 

gradually 

Page 21: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

21

Adapting the value of Ƭ

• The value of Ƭ is very large in the beginning

• As the blocks get older the value of Ƭ  is reducedgradually 

• Decrease in Ƭ α life_difflife_diff = 100K – max_wear

• Decreasing Ƭ ‐ Linear‐ Non‐linear 

Page 22: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

22

Adapting the value of  m

• Value of m controls proportion of blocks storing hot data

• Adapting to workload pattern changes ‐ Increase m when hot data flow is more‐ Decrease m when cold data flow is more 

Page 23: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

23

Evaluation

Page 24: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

24

Overheads in Rejuvenator

• Memory for the lists : ‐ 4 bytes per block address‐ 1 TB flash ( 2KB page, 128 KB block) requires ~ 32MB  of  memory

• Memory for mapping tables : ‐ < 10 % hot data  (page level mapping)‐ at most 250 MB of memory for 1 TB of flash

• O (1) time for list association of blocks• No block copy for hot writes

Page 25: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

25

Simulation Environment

• Simulator written in C++• Takes LBAs from trace as input• Consider small portion of SSD• Maximum erase count of blocks : 2K• Traces used :  Financial, Exchange, Cello • Synthetic traces: 

‐ A : Random writes‐ B : 50% sequential 

Page 26: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

26

Lifetime 

25% Improvement on the average

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Financial Exchange Cello Trace A Trace BNo.

of w

rite

requ

ests

ser

vice

d (A

hun

dred

m

illio

n w

rite

requ

ests

)

Trace Used

Dual Pool

TFFS

Rejuvenator(Linear)

Rejuvenator (Non-linear)

Page 27: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

27

Standard Deviation in Erase counts

Better control of variance in erase counts

0

2

4

6

8

10

12

14

16

Financial Exchange Cello Trace A Trace B

Stan

dard

Dev

iatio

n

Trace Used

Dual Pool

Rejuvenator(Linear)

Rejuvenator (Non-linear)

Page 28: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

28

Standard Deviation in Erase counts ‐ Trend

Tighter constraints only in the end

Page 29: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

29

Static Cold Data Migrations‐ Trend

Tighter constraints only in the end

0

10

20

30

40

50

60

70

80

90

100

175 150 125 100 75 50 25 10

% o

f col

d da

ta m

igra

tions

Value of Ƭ

Rejuvenator(Linear)

Rejuvenator(Non-Linear)

Page 30: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

30

Wear Leveling Block Erase Overhead

Reduced by 15-18 times

0

5

10

15

20

25

Financial Exchange Cello Trace A Trace B

Ove

rhea

d In

curr

ed

Trace Used

Dual Pool

TFFS

Rejuvenator(Linear)

Rejuvenator (Non-linear)

Page 31: Rejuvenator A Static Wear Leveling for NAND Flash …storageconference.us/2011/Presentations/Research/14...Rejuvenator : A Static Wear Leveling Algorithm for NAND Flash Memory with

31

• Rejuvenator

‐ manages variance in erase counts with just enough static cold data migrations

‐ improves lifetime of flash memory‐manages data according to degree of hotness‐ deals with performance – lifetime tradeoff 

• Rejuvenator adapts to changes in workload patterns • A case for integrated wear leveling and GC operations 

Conclusion