SSD

From Leo's Notes
Revision as of 02:35, 19 August 2019 by Leo (talk | contribs) (→Host Interfaces)
This page was last edited on 19 August 2019, at 02:35.

A SSD (short for solid-state drive) uses integrated circuits to store data persistently. Unlike traditional spinning hard disks, a solid-state disk has no moving parts.

Components

Controller

The SSD controller provides an interface to the NAND flash memory and has a significant impact on the SSD performance. Other tasks that are dealt with by the controller are:

  • Bad block mapping
  • Read/write cache
  • Encryption
  • Error detection / correction
  • Garbage collection
  • Wear leveling

Memory

Operation

SSDs use flash memory to retain data. Flash memory stores information in an array of memory cells constructed from floating-gate transistors (Floating-Gate MOSFET, or FGMOS). The floating-gate is a gate that is electrically isolated and can only be altered through injection or tunneling operations.

The charge in the floating gate will affect how current flows through the transistor by partially canceling out the electric field from the control gate. By applying an intermediate voltage to the control gate and sensing the current through the gate, it is possible to determine the 1 bit value (for Single-Level Cell, or SLC) or multiple values (2 or more bits for Multiple-level cell, or MLC) stored in the cell.

Floating-gates are erased using Fowler-Nordheim Tunneling. This is done by applying a high enough voltage between the source/drain/substrate and the control gate. Electrons in the floating gate will 'tunnel' through the oxide layer thereby erasing its value back to 1 (no electrons represents 1).

Inversely, floating-gates are written to using hot electron injection.

Single-, Multiple-Level Cells

Each floating gate holds a charge. Intuitively, a cell can store a binary bit. With a smarter controller that has a analog to digital converter (ADC), it is possible to use multiple charge states to store more bits.

By using multiple charge states, there is less tolerance between charge states which leads to higher chances for errors, at the expense of allowing for higher data density. It is important for the SSD controller to handle possible errors due to MLC flash memory with error correcting codes.

  1. SLC - Single Level, 1 bit per cell
  2. MLC - Multiple Level, 2 bits per cell
  3. TLC - Triple Level, 3 bits per cell
  4. QLC - Quad Level, 4 bits per cell

Types

Two common flash memories are: NOR and NAND.

NOR flash cells are connected in parallel and acts like a NOR gate. Reading a particular cell requires all other cells in the arrangement to be turned off so that no current flows except through the cell that is being read.

NAND flash bit cells are connected in series and acts like a NAND gate. Reading a particular bit cell requires all other bit cells in the arrangement to be turned on so that they allow current to flow freely except for the cell that is being read.

NAND flash memory is cheaper because cells can be chained in series rather than NOR where cells are in parallel. There is also less wiring required for NAND cells which increases data density. Higher densities can be achieved by stacking these NAND memory arrays on top of each other (3D-NAND)

Host Interfaces

Interface Speed Note
SAS, Serial attached SCSI 12.0 Gbit/s with SAS-3
Parallel SCSI 40+ Mbit/s
SATA, Serial ATA 6.0 Gbit/s with SATA 3.0
Parallel ATA 1064 Mbit/s with ATA-4/UDMA IDE hard drives
PCI Express 31.5 Gbit/s with PCIe 3.0 x4
M.2 31.5 Gbit/s for PCIe 3.0 x4, 6.0 GBit/s with SATA 3.0
U.2 31.5 Gbit/s with PCIe 3.0 x4
Fibre Channel 128 Gbit/s with 128GFC "Gen 6"
USB 10 Gbit/s with USB 3.1, 5 Gbit/s with USB 3.0, 480 Mbit/s with USB 2.0

Protocols

Two main protocols

  • AHCI - Advanced Host Controller Interface. Used by SATA based drives.
  • NVME - Non-Volatile Memory Express. Tailored specifically for PCIE-based drives.

In terms of performance, NVME SSDs performs better with higher IOPS because of more command queues in parallel. For comparison, AHCI can process up to 32 commands with one command queue while NVME has up to 65,000 command queues with up to 65,000 commands per queue.


Reliability

SSDs store data in electrical charges. This will slowly leak over time without power. Old drives may start losing data after 1-2 years in storage, depending on temperature.