Flash SSD Operations
Nand Flash SSDs¶
basics¶
-
Terminology in flash: banks consist of blocks; and blocks consist of pages.
- banks/planes: consist of a large number of cells
- blocks: size 128 KB or 256 KB
- pages: size 4 KB
- cell level
- one level: store a single bit into a transistor(1/0)
- multi-level: store two bits into different levels of charge(00/01/10/11)… etc
-
Flash-based SSDs
- Flash translation layer(FTL)
- Logical block address(LBA)
-
basic flash operations
- Read(a page)
- Erase(a block)
- Program(a page)
-
Page has state:
INVALID
,ERASED
,VALID
-
raw flash performance
- device property: a page can be written until the entire block first be erased.
- Given above property: program-erase cycle
- latency: we should move data that is about to be erased to another place.
- Problem of reliability: wear out
-
FTL organization
- direct mapped: an operation to logical page N is mapped to physical page N.
- Bad: causing the flash constantly overwritten and worn out eventually
- log structured: in-memory mapping table
- Good:use logging to speedup recovery
- direct mapped: an operation to logical page N is mapped to physical page N.
performance¶
Performance problem:
-
Flash operation: erase >> program(10*) >> read (10*)
- How to improve:
- parallel
- reduce write amplification
- How to improve:
-
garbage collection(Log-structured FTL): old versions of data takes over the space.
Overwritten -> garbage data -> data migration
-
high cost of in-memory mapping table(Log-structured FTL)
Riliability problem:
-
Wear out
(Head crash in mechanical disk in contrast)
- wear leveling: spread writes across the blocks evenly
-
Disturbance: When accessing a page within a flash, some bits can get flipped in neighboring pages.
- sequential programming: write pages in order can reduce the disturbance.
garbage collection¶
…
mapping table¶
wear leveling¶
Disk drive modeling¶
os view of storage device: linear array of logical blocks.