Online Stream Detection Assisted, Log Buffer-Based Mulitiple- - - PowerPoint PPT Presentation

online stream detection assisted log buffer based
SMART_READER_LITE
LIVE PREVIEW

Online Stream Detection Assisted, Log Buffer-Based Mulitiple- - - PowerPoint PPT Presentation

Online Stream Detection Assisted, Log Buffer-Based Mulitiple- Associative Sector Translation FTL Design (SLMAST) Zhengyu Yang , Manu Awasthi Aug 26 2015 Content 1. Backgrounds 2. Related Works 3. Algorithm Design 2 1. Backgrounds - SSD


slide-1
SLIDE 1

Online Stream Detection Assisted, Log Buffer-Based Mulitiple- Associative Sector Translation FTL Design (SLMAST)

Zhengyu Yang , Manu Awasthi Aug 26 2015

slide-2
SLIDE 2

2

Content

  • 1. Backgrounds
  • 2. Related Works
  • 3. Algorithm Design
slide-3
SLIDE 3

3

  • 1. Backgrounds
  • SSD is not good for dealing with random write

and re-write but sequential writes.

  • OS mixes streams from multiple Apps and VM

tenants, which decrease the sequentility.

  • SSD has no idea of stream info.
  • We proposed a FTL design SLMAST:

(1) detect sequential streams based on the locality with low overhead. (2) multiple-associative blocks are used in log block (buffer) to reduce the cost of full merge.

slide-4
SLIDE 4

4

  • 1. Backgrounds

SSD OS

Three jobs for FTL:

  • 1. Mapping table
  • 2. Wear Leveling
  • 3. Garbage Collection

LPA PPA SSD limitations:

  • 1. Erase-before-write
  • 2. Lifetime
  • 3. Recovery
slide-5
SLIDE 5

SSD Erase-before-write limitation

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 1 13 2 14 3 15 4 16 5 17 6 18 7 19 8 20 9 21 10 11

Incoming I/O request W(16 17 18 20)

Re-Write

slide-6
SLIDE 6

SSD Erase-before-write limitation

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 1 13 2 14 3 15 4 16 5 17 6 18 7 19 8 20 9 21 10 11

DataBlk93

12 13 14 15 16 17 18 19 20 21

FreeBlkList Incoming I/O request W(16 17 18 20)

Step1 Get a freeBlk Step2 Assemble Update mapTable Step3 Recycle dataBlk

Re-Write

EraseBlk=2ms ReadPage=25us WritePage=200us

dataBlk

slide-7
SLIDE 7

SSD Erase-before-write issue

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 18 1 13 19 2 14 3 15 4 16<I> 5 17<I> 6 18<I> 7 19<I> 8 20 9 21 10 16 11 17

Incoming I/O request W(16 17 18 20)

Very early solution: page mapping However page mapping has issues: (1) Continuous page are separated (2) Mapping table overhead (3) Too many invalid pages are occupying the disk dataBlk

slide-8
SLIDE 8

SSD Erase-before-write issue

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 18 1 13 19 2 14 3 15 4 16<I> 5 17<I> 6 18<I> 7 19<I> 8 20 9 21 10 16 11 17

Incoming I/O request W(16 17 18 20)

Very early solution: page mapping However page mapping has issues: (1) Continuous page are separated (2) Mapping table overhead (3) Too many invalid pages are occupying the disk dataBlk Block-mapping Log structure

slide-9
SLIDE 9

SSD Erase-before-write issue

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 18 1 13 19 2 14 3 15 4 16<I> 5 17<I> 6 18<I> 7 19<I> 8 20 9 21 10 16 11 17

Incoming I/O request W(16 17 18 20)

Very early solution: page mapping However page mapping has issues: (1) Continuous page are separated (2) Mapping table overhead (3) Too many invalid pages are occupying the disk dataBlk Block-mapping Log structure

Page-level: 48MB for 8G Block-level: 1.5MB for 8G

slide-10
SLIDE 10

10

  • 1. Backgrounds

An Example of Log Structure Data Blocks Log Blocks Block mapping If dataBlk collision: writeToLogBlk Once logBlk is full: do merge

slide-11
SLIDE 11

11

  • 2. Related Works

2.1 BAST 2.2 FAST 2.3 KAST

slide-12
SLIDE 12

2.1 BAST

SRAM - mappingTable SSD

Block mapping

slide-13
SLIDE 13

Step2 Assemble Update mapTable Step3 Recycle dataBlk (2 Erases) Assign freeLogBlk

2.1 BAST – Full Merge

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 24 36 1 13 25 37 2 14 26 38 3 15 27 39 4 16 40 5 17 41 6 18 42 7 19 43 8 20 44 9 21 45 10 22 46 11 23 47

LogBlk0

16 17 18 19 18 19 22 20 16 14 16 17

Step1 Get FreeBlk FreeBlkList

dataBlks logBlks

12 13 14 15 16 17 18 19 20 21 22 23

2 Erases + N Copies

slide-14
SLIDE 14

2.1 BAST – Switch Merge

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4

12 24 36 1 13 25 37 2 14 26 38 3 15 27 39 4 16 40 5 17 41 6 18 42 7 19 43 8 20 44 9 21 45 10 22 46 11 23 47

LogBlk0 LogBlk1 LogBlk2 LogBlk3 LogBlk4

16 5 36 58 25 17 9 37 59 26 18 5 38 60 25 19 4 39 26 18 1 40 26 19 2 41 22 3 42 23 4 43 16 5 44 14 45 16 46 17 47

FreeBlkList Step3 Recycle DataBlk Erase DataBlk Step1 Update MapTable Step2 Assign LogBlk

dataBlks logBlks

1 Erase

slide-15
SLIDE 15

2.1 BAST - Issues

Space Locality

W(0,4,8,12,4,8,12,0,0,4,12,8)

Temporal Locality

W(0,1,2,3,3,2,0,1,0,0,1,2)

dataBlks PBN0 PBN1 PBN2 PBN3 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 logBlks LBN0 LBN2 dataBlks PBN0 PBN1 PBN2 PBN3 4 8 12 1 5 9 13 2 6 10 14 3 7 11 15 logBlks LBN0 LBN2

Besides RND write issue, BAST also has block-thrashing issue:

slide-16
SLIDE 16

2.2 FAST

Flash SRAM - MapTable

slide-17
SLIDE 17

2.2 FAST - FullAssoLogBlk

1 Sequential LogBlk N Rand LogBlks Capture SeqPgs Increase SwitchMerge

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4 12 24 36 1 13 25 37 2 14 26 38 3 15 27 39 4 16 40 5 17 41 6 18 42 7 19 43 8 20 44 9 21 45 10 22 46 11 23 47 SLB0 RLB0 RLB1 RLB2 RLB3 32 56 36 104 1 65 57 37 32 2 163 58 38 3 362 59 39 4 963 36 40 5 17 37 41 6 18 54 54 7 19 55 55 8 40 56 56 9 41 110 57 10 42 58 46 11 43 59 47

dataBlks logBlks

slide-18
SLIDE 18

2.2 FAST - PartialMerge

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4 12 24 36 1 13 25 37 2 14 26 38 3 15 27 39 4 16 40 5 17 41 6 18 42 7 19 43 8 20 44 9 21 45 10 22 46 11 23 47 SLB0 RLB0 RLB1 RLB2 RLB3 32 56 36 104 1 65 57 37 32 2 163 58 38 3 362 59 39 4 963 36 40 5 17 37 41 6 18 54 54 19 55 55 40 56 56 41 110 57 42 58 46 43 59 47

dataBlks logBlks

1 Erase + (𝑶𝑸 − |𝑴|) Copies

slide-19
SLIDE 19

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4 12 24 36 1 13 25 37 2 14 26 38 3 15 27 39 4 16 40 5 17 41 6 18 42 7 19 43 8 20 44 9 21 45 10 22 46 11 23 47 SLB0 RLB0 RLB1 RLB2 RLB3 32 56 36 104 1 65 57 37 32 2 163 58 38 3 362 59 39 4 963 36 40 5 17 37 41 6 18 54 54 7 19 55 55 8 40 56 56 9 41 110 57 10 42 58 46 11 43 59 47

Copy from dataBlk to logBlk

dataBlks logBlks

1 Erase + (𝑶𝑸 − |𝑴|) Copies

2.2 FAST - PartialMerge

slide-20
SLIDE 20

DataBlk0 DataBlk1 DataBlk2 DataBlk3 DataBlk4 12 24 36 1 13 25 37 2 14 26 38 3 15 27 39 4 16 40 5 17 41 6 18 42 7 19 43 8 20 44 9 21 45 10 22 46 11 23 47 SLB0 RLB0 RLB1 RLB2 RLB3 32 56 36 104 1 65 57 37 32 2 163 58 38 3 362 59 39 4 963 36 40 5 17 37 41 6 18 54 54 19 55 55 40 56 56 41 110 57 42 58 46 43 59 47

dataBlks logBlks

(𝐿 𝑀 +1) Erase + (𝐿 𝑀 +1) Copies

2.2 FAST - FullMerge

slide-21
SLIDE 21

2.2 FAST

Contributions:

  • 1. FullMerge -> Partial/SwitchMerge
  • 2. Capture sequential streams

Merge Copy Times Erase Times Full 𝐿 𝑀 ×𝑂* 𝐿 𝑀 +1 Switch 1 Partial 𝑂* − |𝑀| 1

slide-22
SLIDE 22

2.2 FAST - Issues

SLB0 RLB0 RLB1 RLB2 RLB3 32 56 36 104 1 65 57 37 32 2 163 58 38 3 362 59 39 4 963 36 40 5 17 37 41 6 18 54 54 7 19 55 55 8 40 56 56 9 41 110 57 10 42 58 46 11 43 59 47

  • 1. Does not consider multiple sequential streams.

Thrashing issues still exist:if multiple sequential streams simultaneously come, they will be interleaved together. StreamA:0,1,2,3,4 StreamB:12,13,14,15,16 StreamC:24,25,26,27,28

0 1 12 24 2 3 13 14 15 25 26 4 16 27 28

slide-23
SLIDE 23

2.2 FAST - Issues

SLB0 RLB0 RLB1 RLB2 RLB3 ? 32 56 36 104 ? 65 57 37 32 2 163 58 38 3 362 59 39 4 963 36 40 5 17 37 41 6 18 54 54 7 19 55 55 8 40 56 56 9 41 110 57 10 42 58 46 11 43 59 47

  • 2. Only treats block header as a VIP role:
  • Not really detecting sequential or not.
  • BlkHdr is only necessary condition of SwitchMerge.
  • One block can have more than 256 pages these days.
  • If sequential stream begins from any place of a block,

FAST cannot capture it.

slide-24
SLIDE 24

2.3 KAST

slide-25
SLIDE 25

2.3 KAST

  • Guarantee max associated blocks when full merging
  • Multiple SEQ log blocks
  • Dynamically partition between SEQ and RND log

blocks

slide-26
SLIDE 26

26

  • 3. Algorithm Design
slide-27
SLIDE 27

27

  • 3. Algorithm Design

Stream Detector

slide-28
SLIDE 28

28

writeToLogBlk(LPA )

  • 1. Page is header

1.1. Page’s block is found in SZ, then switchMerge or fullMerge with the new page 1.2. Page’s block is not found in SZ, then switchMerge or partialMerge a victim block and add the new page into a new free block

  • 2. Page is not header

2.1. Page’s owner is found in SZ, then add the page to SZ 2.2. Page’s owner is found in KZ, then add the page to KZ 2.3. Page’s owner is not in SZ and KZ 2.3.1. Page is detected as part of a sequential stream, add to KZ 2.3.2. Page is not detected as part of a sequential stream, then add to RZ write(LPA, data): if a collision occurs: writeToLogBlk(LPA, LBA, offset, data) else write data at offset in dataBlk of PBA updateStreamRecord(LPA)

slide-29
SLIDE 29

29

  • 3. Algorithm Design

writeToLogBlk(LPA )

  • 1. Page is header

1.1. Page’s block is found in SZ, then switchMerge or fullMerge with the new page 1.2. Page’s block is not found in SZ, then switchMerge or partialMerge a victim block and add the new page into a new free block

  • 2. Page is not header

2.1. Page’s owner is found in SZ, then add the page to SZ 2.2. Page’s owner is found in KZ, then add the page to KZ 2.3. Page’s owner is not in SZ and KZ 2.3.1. Page is detected as part of a sequential stream, add to KZ 2.3.2. Page is not detected as part of a sequential stream, then add to RZ

slide-30
SLIDE 30

30

  • 3. Algorithm Design

writeToLogBlk(LPA )

  • 1. Page is header

1.1. Page’s block is found in SZ, then switchMerge or fullMerge with the new page 1.2. Page’s block is not found in SZ, then switchMerge or partialMerge a victim block and add the new page into a new free block

  • 2. Page is not header

2.1. Page’s owner is found in SZ, then add the page to SZ 2.2. Page’s owner is found in KZ, then add the page to KZ 2.3. Page’s owner is not in SZ and KZ 2.3.1. Page is detected as part of a sequential stream, add to KZ 2.3.2. Page is not detected as part of a sequential stream, then add to RZ