PS Modern SSDs Understanding and Designing Modern NAND

  • Slides: 21
Download presentation
P&S Modern SSDs Understanding and Designing Modern NAND Flash-Based Solid-State Drives Dr. Jisung Park

P&S Modern SSDs Understanding and Designing Modern NAND Flash-Based Solid-State Drives Dr. Jisung Park Prof. Onur Mutlu ETH Zürich Spring 2021 24 March 2021

Today’s Agenda n Request Handling in Modern SSDs n MQSim Organization 2

Today’s Agenda n Request Handling in Modern SSDs n MQSim Organization 2

Recap: Modern SSD Architecture n A modern SSD is a complicated system that consists

Recap: Modern SSD Architecture n A modern SSD is a complicated system that consists of multiple cores, HW controllers, DRAM, and NAND flash memory chips SSD Controller Core 0. 001× 1, 024 = 1 GB LPDDR DRAM 8× 128 GB = 1 TB NAND Packages Core HW HW Flash Ctrl. Flash. Ctrl. Request Handler ECC/Randomizer Encryption Engine Samsung PM 853 T 960 GB Enterprise SSD (from https: //www. tweaktown. com/reviews/6695/samsung-pm 853 t-960 gb-enterprise-ssd-review/index. html) 3

Another Overview Host Interface Layer (HIL) DRAM Flash Translation Layer (FTL) Data Cache Management

Another Overview Host Interface Layer (HIL) DRAM Flash Translation Layer (FTL) Data Cache Management Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… NAND … Flash Package … CTRL Randomizer CTRL ECC Write Buffer Logical-to-Physical Mappings Address Translation Flash Controller Host Request Queue NAND Flash Package 4

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer … CTRL ECC CTRL Flash Controller n q n NAND … Flash Package NAND Flash Package Communication with the host operating system (receives & returns requests) Via a certain interface (SATA or NVMe) A host I/O request includes q q Request direction (read or write) Offset (start sector address) Size (number of sectors) Typically aligned by 4 Ki. B 5

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer … CTRL ECC CTRL Flash Controller n Buffering data to write (read from NAND flash memory) q q q NAND … Flash Package NAND Flash Package n Essential to reducing write latency Enables flexible I/O scheduling Helpful for improving lifetime (not so likely) Limited size (e. g. , tens of MBs) q q Needs to ensure data integrity even under sudden power-off Most DRAM capacity is used for L 2 P mappings 6

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer … CTRL ECC CTRL Flash Controller n Core functionality for out-of-place writes q n Needs to maintain L 2 P mappings q NAND … Flash Package NAND Flash Package n To hide the erase-before-write property Logical Page Address (LPA) Physical Page Address (PPA) Mapping granularity: 4 Ki. B q 4 Bytes for 4 Ki. B 0. 1% of SSD capacity 7

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer … CTRL ECC CTRL Flash Controller n q q n NAND … Flash Package NAND Flash Package Garbage collection (GC) Wear-leveling (WL) q q n Reclaims free pages Selects a victim block copies all valid pages erase the victim block Evenly distributes P/E cycles across NAND flash blocks Hot/cold swapping Data refresh q Refresh pages with long retention ages 8

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Write Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer … CTRL ECC CTRL Flash Controller n Error-correcting codes (ECC) q q NAND … Flash Package NAND Flash Package n Randomizer q q n Can detect/correct errors: e. g. , 72 bits/1 Ki. B error-correction capability Stores additional parity information together with raw data Scrambling data to write To avoid worst-case data patterns that can lead to significant errors Issue NAND flash commands 9

Request Handling: Read Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Read Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer NAND … Flash Package … CTRL ECC CTRL Flash Controller n NAND Flash Package First checks if the request data exists in the write buffer q n If so, returns the corresponding request immediately with the data A host read request can be involved with several pages q Such a request can be returned only after all the requested data is ready 10

Request Handling: Read Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Read Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer NAND … Flash Package … CTRL ECC CTRL Flash Controller n Finds the PPA where the request data is stored from the L 2 P mapping table NAND Flash Package 11

Request Handling: Read Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer

Request Handling: Read Host Interface Layer (HIL) DRAM Host Request Queue Flash Translation Layer (FTL) Write Buffer Data Cache Management Logical-to-Physical Mappings Address Translation Metadata (e. g. , P/E Cycles) GG/WL/Refresh/… Randomizer NAND … Flash Package … CTRL ECC CTRL Flash Controller NAND Flash Package n First reads the raw data from the flash chip n Derandomizes the raw data n Performs ECC decoding n ECC decoding can fail q q Retries reading of the page w/ adjusted VREF Soft-decision ECC (LDPC) 12

MQSim Organization n Repository q n https: //github. com/CMU-SAFARI/MQSim/src/ Host interface models (NVMe and

MQSim Organization n Repository q n https: //github. com/CMU-SAFARI/MQSim/src/ Host interface models (NVMe and SATA) Storage memory device models (NAND flash chips) Simulation engine SSD component models 13

MQSim Organization n MQSim/src/ssd/ q Host_Interface_*. cpp n q Data_Cache_Manager_*. cpp n q Data

MQSim Organization n MQSim/src/ssd/ q Host_Interface_*. cpp n q Data_Cache_Manager_*. cpp n q Data Cache Management FTL. cpp n n n q Host Interface Layer Address_Mapping_Unit_*. cpp GC_and_WL_Unit_*. cpp TSU_*. cpp (Transaction Scheduling Unit) NVM_PHY_*. cpp n Interface w/ storage memory devices 14

MQSim Organization n MQSim/nvm_chip/ q flash_memory/ n n n q Flash_Chip. cpp Plan. cpp

MQSim Organization n MQSim/nvm_chip/ q flash_memory/ n n n q Flash_Chip. cpp Plan. cpp Block. cpp Page. h … NVM_Chip. h 15

MQSim Organization n MQSim/src/sim q Engine. cpp q MQSim is an event-driven simulator n

MQSim Organization n MQSim/src/sim q Engine. cpp q MQSim is an event-driven simulator n n Events from a trace / event generator A host request leads to many subevents depending on the current SSD state q q n Data cache management Address translation Transaction scheduling NAND flash operations Simulation process q q Builds an event list (tree) Collects statistics from the current state Removes the first event from the list and Handles it Set times to the time of this event 16

First Step: Refactoring SIM Engine n Go through files in MQSim/src/sim/ q q n

First Step: Refactoring SIM Engine n Go through files in MQSim/src/sim/ q q n Go through other files in MQSim/src/ssd q n To figure out how classes are related to each other What the simulation engine does To figure out how SSD components interact with the simulation engine Improve coding convention q Mixed convention: hard to reuse the code n q Remove. Object vs. Start_simulation Remove_object or Start. Simulation Suggestion: Google C++ Style Guide n https: //google. github. io/styleguide/cppguide. html 17

Required Material n Yu Cai, Saugata Ghose, Erich F. Haratsch, Yixin Luo, and Onur

Required Material n Yu Cai, Saugata Ghose, Erich F. Haratsch, Yixin Luo, and Onur Mutlu, “Errors in Flash-Memory-Based Solid-State Drives: Analysis, Mitigation, and Recovery, ” Invited Book Chapter in Inside Solid State Drives, 2018 - Introduction and Section 1 18

Recommended Material n Arash Tavakkol, Mohammad Sadrosadati, Saugata Ghose, Jeremie Kim, Yixin Luo, Yaohua

Recommended Material n Arash Tavakkol, Mohammad Sadrosadati, Saugata Ghose, Jeremie Kim, Yixin Luo, Yaohua Wang, Nika Mansouri Ghiasi, Lois Orosa, Juan Gómez Luna, and Onur Mutlu, “FLIN: Enabling Fairness and Enhancing Performance in Modern NVMe Solid State Drives, ” In ISCA, 2018 19

Next Meetings n n We will provide background on NAND flash memory We will

Next Meetings n n We will provide background on NAND flash memory We will discuss your progress in last week q Please contact us whenever you have any questions 20

P&S Modern SSDs Understanding and Designing Modern NAND Flash-Based Solid-State Drives Dr. Jisung Park

P&S Modern SSDs Understanding and Designing Modern NAND Flash-Based Solid-State Drives Dr. Jisung Park Prof. Onur Mutlu ETH Zürich Spring 2021 24 March 2021