CSE 451
Operating Systems
L20 - SSDs and Flash Translation Layer
Slides by: Tom Anderson
Rohan Kadekodi
Main Points
Volatile Memory: SRAM and DRAM
Persistent Memory: Flash and Magnetic Disk
5
[J. McCallum, jcmit.org]
DRAM
Flash
Disk
Flash Memory
Flash Memory Challenge
Managing Wearout
⇒ Wearout (of one block) in 10 seconds !
⇒ Disk keeps getting smaller over time…
=> Can’t allow update in place
Flash Translation Layer (FTL)
FTL in Picture Form
Eventually we’ll run out of space…
D C E A D C B A
writes
Translation map
A B C D E F G H
Block storage
1 2 3 4 5 6 7 8
A
1
B
2
C
3
D
4
A
5
E
6
C
7
D
8
crash
read
Erasures
Efficient Compaction
write amplification due to compaction
% of disk utilization
Avoid worst-case compaction by reserving unused physical space (20-30%)
Wear Levelling
SSD Encoding/Error Detection
Micron 9550 NVMe SSD (TLC)
Capacity | 25 TB |
Page Size | 4 KB |
Bandwidth (Sequential Reads) | 14 GB/s |
Bandwidth (Sequential Writes) | 7.6 GB/s (peak) |
Random 4KB Reads | 2.8M/sec |
Random 4KB Writes | .75M/sec |
Endurance | 10000 erase/write cycles |
Latency (read/write) | 60us/15us |
Interface | NVMe |
Error Detection/Correction
=> In cloud settings, both ECC and application-level validation checks needed
SSD Scaling Bandwidth
Implications of Striping
Device management overhead
SSD Throughput (MB/s)
SSD prefers large sequential IO
64 MB 128 MB 256 MB 512 MB 1024 MB
1250
1000
750
500
250
0
0.1 0.25 0.5 0.6 0.7 0.8 0.9 1
SSD utilization
SSD Random writes: 5-6x difference in performance
Magnetic Disk
Magnetic Disk Anatomy
Disk Tracks
Disk Performance
Disk Latency =
Seek Time + Rotation Time + Transfer Time
Seek Time: time to move disk arm over track (1-20ms)
Fine-grained position adjustment necessary for head to “settle”
Head switch time ~ track switch time (on modern disks)
Rotation Time: time to wait for disk to rotate under disk head
Disk rotation: 4 – 15ms (depending on price of disk) On average, only need to wait half a rotation
Transfer Time: time to transfer data onto/off of disk
Disk head transfer rate: 100-250MB/s (5-10 usec/sector)
Host transfer rate dependent on I/O connector (USB, SATA, …)
Western Digital Ultrastar DC HC690
Capacity | 32 TB, 7 platters |
Spin Speed | 7200 RPM |
Sustained Transfer Rate | 270 MB/s (read), 260 MB/s (write) |
Interface Transfer Rate | 1.2 GB/s |
Seek time (avg) | 8 ms (read), 8.6 ms (write) |
Rotational latency (avg) | 4.16 ms |
Cache | 512 MB DRAM |
Idle/Operating Power | 5.8W/9.7W |
Bit Error Rate (read) | 10^-15 |