On Efficient Wear Leveling for Large-Scale Flash-Memory

Preview:

Citation preview

On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems

Li-Pin ChangDepartment of Computer Science, National Chiao-Tung University, Hsin-Chu, Taiwan

2008-02-15 Speaker: Kwon, Ohhoon

ACM Symposium on Applied Computing 2007

Introduction Attractive features of flash memory

Small size Fast access speed Shock resistance Light weight

Characteristics Write is not allowed before erasing The number of erase operations is limited (100,000) Asymmetry in read and write speeds

Erase(100X) > Write(5X) > Read(1X) Asymmetry in read/write and erase size

Read/write : page Erase : block

Flash Memory

erase update

write

To update the data in flash memory, 1. All data in the block is copied to

a system buffer 2. The data is updated in system

buffer3. The block on flash memory has

been erased, 4. all data must be written back

from system buffer to the block. Therefore, updating even one

byte data requires one slow erase and several write operations.

In-Place-Update

block

block

block

block

Update this data

read

Flash Memory

update write

Out-Place-Update

block

block

block

block

read

Update this data

To address the problem of in-place-update, out-place-update is exploited

1. The page only is copied to a system buffer

2. The data is updated in system buffer

3. The page is written at the other place on flash memory

4. The orignal page is marked as invalid

Garbage collection is performed to translate invalid page to free page

buffer

Hot and Cold Data

As hot data and cold data differently wear flash memory, its overall lifespan could be unexpectedly short under such workload.

Wear leveling refers to system activities in order to lengthen the overall lifespan

block block block block block block block block block

A dual-pool algorithm dual-pool for wear leveling

HpHp Hp Hp Hp...

Hot pool

CpCp Cp Cp...

Cold pool

( Dual-pool )( None)

Dirty Swap (DS) On the completion of a write request, the following condition

is checked:

Step 1. Data on alll live pages in block H+(QHP) are copied to some other free pages

Step 2. Erase block H+(QHP)

Step 3. Copy data on all live pages from block H-(QCP) to block H+(QHP)

Step 4. Erase block H-(QCP)

Step 5. Swap block H+(QHP) and block H-(QCP) in terms of their pool associations.

A dual-pool algorithm

A dual-pool algorithm Dirty Swap (DS)

HpHp Hp Hp Hp...

Hot pool

CpCp Cp Cp...

Cold pool

H+(QHP)

H-(QCP)

8 3 - > 4

Dirty Swap (DS) should be now performed

A dual-pool algorithm Dirty Swap (DS)

Hp Hp Hp Hp...

Hot pool

CpCp Cp Cp...

Cold pool

H+(QHP)

H-(QCP)

H+(QHP)

HpFree block

H-(QCP)

H+(QCP)

H-(QHP)

Adaptive pool resizing Hot-Pool Resize(HPR): On the completion of a write request,

block H-(QHP) is moved from the hot pool to the cold pool if the following condition is checked:

Cold-Pool Resize(CPR): On the completion of a write request, block H+(QCP) is moved from the cold pool to the hot pool if the following condition is checked:

A dual-pool algorithm

* Effective Erase Cycle(EEC): how many time a block is erased since the last time the block is involoved in DS

Random Priority Queues : Bit-Pyramid RPQ A pyramid RPQ is of a bit pyramid and a linear array Indexes of the linear array stand for keys of items, and each

slot of the array contains the priority of an item.

A dual-pool algorithm

Performance Evaluation

(65,536 items)

Conclusion This paper aims at both the two issues

Poor wear-leveling, Low scalability

A novel algorithm is proposed based on two new ideas To cease the wearing of a frequently erased block by storing

cold data in it To leave alone blocks just involved in wear leveling.

Based on a newly proposed data structure, a highly scalable implementation of the proposed algorithm is presented.

Conclusion This paper aims at both the two issues

Poor wear-leveling, Low scalability

A novel algorithm is proposed based on two new ideas To cease the wearing of a frequently erased block by storing

cold data in it To leave alone blocks just involved in wear leveling.

Based on a newly proposed data structure, a highly scalable implementation of the proposed algorithm is presented.

Garbage collection procedure1. Select a victim block to clean2. Copy valid pages in the victim block to free block3. Erase the victim block

block block block block block block

① Select a victim block

② copy out valid pages

③ erase the victim block

Recommended