Sub topic 3
Solid-state drives: NAND flash with no moving parts
This chapter assumes you know the difference between storage and RAM, and that you have seen the HDD chapter's terms: platters, spindle speed, and seek time. It covers how an SSD works and how it compares with an HDD. Interfaces and form factors come in later chapters.
What an SSD is
A solid-state drive (SSD) stores data in NAND flash memory chips. NAND flash is non-volatile, so it keeps data with the power off. An SSD has no platters, spindle, or read/write heads. Any stored location can be reached in about the same short time, so there is no seek delay.
Inside the drive
An SSD has three main parts:
- NAND flash chips hold the data. Cells are grouped into pages, and pages are grouped into blocks.
- A controller is a small processor that maps the addresses the operating system uses onto physical cells. It also spreads writes evenly and corrects errors.
- A cache, often DRAM, speeds up the controller's address lookups. Some budget drives leave it out.
Flash can be written only to empty pages, and it can be erased only one whole block at a time. Each cell survives a limited number of erase cycles. The controller therefore uses wear leveling, which spreads writes across all blocks so that none wears out early. The operating system's TRIM command tells the drive which blocks no longer hold useful data, so the controller can erase them ahead of time.
SSD versus HDD
| Feature | HDD | SSD |
|---|---|---|
| Speed | Slower, limited by seek time | Much faster, no seek time |
| Durability | Moving parts are sensitive to shock | No moving parts, more shock resistant |
| Cost per GB | Lower | Higher |
| Noise | Audible spin and seek sounds | Silent |
| Power and heat | Higher | Lower |
An SSD wears out through writes, not through mechanical failure. Drives are rated in terabytes written (TBW), and normal desktop use rarely reaches the limit.
Checking the drive type
Use these commands to confirm whether a drive is an SSD.
Get-PhysicalDisk | Select-Object FriendlyName, MediaType, BusType, Sizelsblk -d -o NAME,ROTA,SIZE,TYPEOn Linux, ROTA of 0 means the drive is non-rotational, so it is an SSD.
Common errors
- Defragmenting an SSD. It is unnecessary and adds wear. Windows runs TRIM on SSDs instead.
- Treating "SSD" as an interface. SSD describes the storage technology. The same flash can sit behind SATA or NVMe.
- Expecting an HDD-style recovery. A failed SSD controller can make all data unreadable at once, so keep backups.
Exercise
A technician runs lsblk -d -o NAME,ROTA,SIZE,TYPE and sees ROTA = 0 for a drive. What type of drive is it, and why should it not be defragmented?
Show answer
It is a non-rotational drive, so an SSD. Defragmenting adds needless write wear, and an SSD has no seek time to improve. The OS uses TRIM to maintain it instead.
Exercise
What two jobs does an SSD controller perform to extend the life of the NAND flash?
Show answer
It performs wear leveling, which spreads writes evenly across blocks. It also works with TRIM, which lets it erase blocks that no longer hold needed data ahead of time.