Upgrade to Pro — share decks privately, control downloads, hide ads and more …

190918_Solid_State_Drive.pdf

Buzzvil
September 18, 2019

 190918_Solid_State_Drive.pdf

190918_Solid_State_Drive.pdf

Buzzvil

September 18, 2019
Tweet

More Decks by Buzzvil

Other Decks in Programming

Transcript

  1. Block Characteristics of NAND Flash - Non-volatile - Erase-before-write -

    Limited lifetime(Program/Erase cycle) - Asymmetric operation - Program: ~300us - Read: ~25us - Erase: ~2ms - Asymmetric unit - Program & Read: Page - Erase: Block Page Page Page Page
  2. Address Mapping Techniques a. Block Level Mapping b. Page Level

    Mapping c. Hybrid Mapping Memory usage: block level < hybrid < page level # of GC: block level > hybrid >page level
  3. Invalid Page Block Level Mapping Block #2 Block #1 22

    2 Logical Page Number Page Index Physical Block Number LBN PBN 1 2 2 -1 ... ... 22 3 ... ... Page #1 Page #2 Page #3 Page #4 Block #0 Page #1 Page #2 Page #3 Page #4 Page #1 Page #2 Page #3 Page #4 Block #3 Page #1 Page #2 Page #3 Page #4 Valid Page Free Page no mapping block
  4. Page Level Mapping 00000022 Logical Page Number Physical Page Number

    LPN PPN 1 3 ... ... 22 0xC02 Invalid Page Block #2 Block #1 Page #1 Page #2 Page #3 Page #4 Block #0 Page #1 Page #2 Page #3 Page #4 Page #1 Page #2 Page #3 Page #4 Block #3 Page #1 Page #2 Page #3 Page #4 Valid Page Free Page (PBN) << 10 + Index
  5. Garbage Collection 1. Select victim blocks 2. Copy all valid

    pages to the free block (Merge) 3. Erase victim blocks → free block GC incurs 1. Increase response time of user request 2. Increase # of P/E cycle(lifetime)
  6. Victim Block Merge Operation Victim Block Page #1 Page #2

    Page #3 Page #4 Block Page #1 Page #2 Page #3 Page #4 Page #1 Page #2 Page #3 Page #4 Victim Block Page #1 Page #2 Page #3 Page #4 Block Page #1 Page #2 Page #3 Page #4 Victim Block Page #1 Page #2 Page #3 Page #4 1. Full merge 2. Partial Merge 3. Switch Merge Invalid Page Valid Page Free Page
  7. Technical issues of GC 1. How to organize valid data

    blocks containing hot and cold data cause partial & full merge → hot(or cold) data blocks will be switch-merged 2. When to begin On-demand: prevents user request because of merge operation Background: high managing cost(GC scheduling) 3. Victim block selection: Which block to reclaim blocks that minimize merging cost and have low P/E cycle
  8. Wear Leveling evenly distributed P/E cycle - Swap cold data

    block and hot data block - increase unnecessary P/E cycle to avoid “dead block”
  9. Special SSDs for enterprises Transactional SSD: Support transaction in SSD

    Multi-Stream SSD: write data to different block each stream Open-Channel SSD: Manage FTL in host side Optane DIMM(non-volatile memory): Use low-latency ssd as a memory Key-Value SSD: Offload storage engines of KV store (e.g, wired tiger) into SSD
  10. Q&A 1. Mapping table은 어디에 보관하는가 - 똑같이 Nand에 저장함

    2. 종료될 땐 어떻게 되는가 - SSD내부에 비상전력이 있어서 mapping table을 모두 저장하고 셧다운됨 3. invalidation과정 - page를 write할때 기존 mapping table에 ppn이 있으면 해당 ppn page를 지웠다고 마크 (FTL에서 관리하는 메타데이터) 4. SSD용량을 많이쓰면 안좋다던데 - 용량을 많이쓰면 Free block이 줄어들어 빈번한 GC가 생김 5.