What is the solid state disk?

What is a solid state disk?

A solid state disk (SSD) is a data storage device that uses integrated circuit assemblies to store data persistently. SSDs use flash memory, which retains data even when power is lost. This differs from a traditional hard disk drive, which stores data on magnetized platters.

How does a solid state disk work?

An SSD consists of a collection of NAND flash memory chips connected to a controller. The controller manages all read and write operations to the flash memory. When data is written to an SSD, it is broken down into pages and programmed to empty cells in the flash memory. Reads occur at the page level as well, by accessing the contents of memory cells.

What are the components of a solid state disk?

The key components of an SSD are:

  • NAND flash memory – Stores data persistently by programming cells to different voltage levels
  • Controller – Manages all read/write ops, garbage collection, wear leveling, etc.
  • DRAM cache – Improves write performance by temporarily storing data
  • Host interface – Connects the SSD to the host computer, e.g. SATA or PCIe

Additional components can include capacitors to allow data flush on power loss and encryption hardware for security. The circuit board connects all the components together.

What are the advantages of a solid state disk?

SSDs provide major advantages over hard disk drives:

  • Faster access times – Data can be accessed in microseconds rather than milliseconds
  • Higher reliability – No moving parts and better shock resistance
  • Lower power consumption – No spinning platter or moving head
  • Lighter weight – Flash chips weigh less than platters and an actuator arm
  • Noiseless operation – No sound from spinning platters or seek head movement

The combination of speed, reliability, and silence makes SSDs ideal for consumer devices like laptops. Their advantages for enterprise storage like web servers are also growing quickly.

What are the disadvantages of a solid state disk?

The downsides of SSDs include:

  • Higher cost per gigabyte – SSDs are more expensive than hard drives today
  • Limited number of writes – Flash cells wear out after ~10k writes per cell
  • File system fragmentation – Degrades write performance over time
  • Heat concerns – Proper cooling is needed to maintain speed
  • Lower capacity – Hard drives offer much higher maximum capacities

Cost is improving rapidly, but the other factors require flash-optimized operating system and file system designs to overcome. Consumer workloads are less impacted than heavy write enterprise workloads.

How is data stored on a solid state disk?

Data is stored in individual flash memory cells, which are grouped into pages, blocks, and chips:

  • Cell – Basic unit of storage, stores 1-4 bits of data
  • Page – Group of cells erased together, typically 4-16kB in size
  • Block – Group of pages erased together, typically 128-256 pages per block
  • Chip – Contains multiple blocks/pages/cells

Writes occur at the page level, but erases happen on entire blocks due to NAND flash limitations. The SSD controller handles this page/block structure and implements strategies like wear leveling to distribute writes across all available cells.

Example NAND flash array structure:

Chip Block Page Cells
1 1 1 Cells 1-4096
1 1 2 Cells 4097-8192
1 2 1 Cells 8193-12288

What is wear leveling and why is it important?

Wear leveling is a key function of SSD controllers to improve flash memory lifespan. It ensures that writes are distributed across all available cells evenly. This prevents any single cell from wearing out prematurely.

The need for wear leveling stems from the erase limit of NAND flash cells. Cells degrade as electrons get trapped in the insulating oxide with each program/erase cycle. After 10,000-100,000 cycles, they can no longer reliably store data.

Without wear leveling, writes would go to new empty cells each time. The same static set of cells would get rewritten frequently, wearing them out faster. Wear leveling ensures all cells get reprogrammed at similar rates, maximizing overall SSD endurance.

What is garbage collection and why is it necessary?

Garbage collection is the process of reclaiming blocks with invalid pages so they can be reused in SSDs. It is necessary due to the block erase limitation of NAND flash.

When data is rewritten, the original page with that data becomes invalid. But the page cannot be erased individually – the entire block must be erased to reprogram any pages. Garbage collection clears out these invalid pages at the block level to make free pages available again.

Without garbage collection, all pages would eventually fill with both valid and invalid data. No free pages would exist for new writes. The SSD would need excess overprovisioned capacity to accommodate pages going out of use. Garbage collection minimizes this wasted space.

What is TRIM and why is it important for SSDs?

TRIM is an operating system command that allows SSDs to proactively erase deleted data more efficiently. It improves write speeds and eliminates file system fragmentation concerns.

When a file is deleted, the operating system simply marks the corresponding pages on the SSD as invalid. With TRIM, it also informs the SSD which pages contain invalid data. The SSD can then immediately perform garbage collection on those pages without needing to scan for invalid data.

This avoids write performance degradation that occurs when mixing new writes with pre-existing invalid pages in blocks. Those pages don’t need to be erased until right before overwriting now. TRIM keeps the SSD cleanly erased optimizing performance.

What is RAID and how is it used with solid state disks?

RAID stands for Redundant Array of Independent Disks. It is a storage technology that combines multiple disks to provide increased availability, reliability, capacity, and performance. SSDs are now commonly used in RAID.

Some examples of RAID with SSDs:

  • RAID 0 – Stripes data across multiple SSDs for faster reads/writes
  • RAID 1 – Mirrors disks for 1:1 redundancy, popular with dual SSDs
  • RAID 5 – Stripes and distributes parity, ideal for SSD arrays
  • RAID 10 – Mirrors stripes, provides speed and redundancy

Compared to hard disks, RAID can deliver bigger performance gains with SSDs due to their faster nature. But RAID is still used more for availability since SSDs already have good reliability.

What are the different form factors available for solid state disks?

SSDs are available in several physical form factors with different interfaces, capacities, and performance levels:

  • 2.5 inch SATA – Used for laptops and desktops. Up to 4TB.
  • M.2 – Small card form factor. PCIe or SATA interfaces. Up to 2TB.
  • U.2 – Enterprise version of 2.5 inch drive. SAS interface. Up to 15TB.
  • Add-in card – PCIe interface for ultra-high performance. Up to 16TB.
  • Embedded – For specialized and industrial applications. Lower capacities.

2.5 inch and M.2 SATA drives are the most common in consumer devices. Enterprise servers use U.2, PCIe add-in card, and embedded form factors. M.2 PCIe offers an excellent balance of size and speed for many uses.

How does an SSD compare to a hard disk drive in terms of performance?

SSDs are much faster than hard disk drives across most metrics:

SSD HDD
Sequential read speed Up to 3500 MB/s Up to 250 MB/s
Sequential write speed Up to 3000 MB/s Up to 250 MB/s
Random read speed Up to 800k IOPS Up to 120 IOPS
Random write speed Up to 700k IOPS Up to 120 IOPS
Latency 10-100 microseconds 1-10 milliseconds

This massive performance advantage comes from the fast nature of flash memory versus physical platters and heads. HGST SSDs currently lead top HDDs in every category.

What is the expected lifetime or endurance of a modern SSD?

Most consumer SSDs today have endurance ratings between 150-600 total terabytes written (TBW) for the entire drive. High-end models are over 1 petabyte. Enterprise and datacenter SSDs are even higher at multiple petabyte lifetimes.

This endurance equates to:

  • 5+ years at 40 GB daily writes (desktop usage)
  • 3-5 years at 70 GB daily (heavy workstation use)
  • 1-3 years at 100+ GB daily (datacenter server)

The primary factors are rated drive writes per day (DWPD) and capacity. Higher DWPD and smaller sizes have better endurance. Controlled by wear leveling, actual SSD lifespan usually exceeds ratings.

What types of NAND flash memory do SSDs use?

There are several types of NAND flash memory with tradeoffs in cost, performance, and endurance:

  • SLC – Fastest and most enduring, but expensive. Rare today.
  • MLC – Faster than TLC but lower density. Common in consumer SSDs.
  • TLC – Slower than MLC but much higher density. Used in many large SSDs.
  • QLC – Dense and slowest type, short endurance. For read-centric drives.

Most SSDs use multi-level cell (MLC) or triple-level cell (TLC) NAND. Consumer SSDs have moved primarily to TLC for larger capacities while enterprise SSDs still leverage faster MLC NAND variants. Quad-level cell (QLC) is emerging for high density, archival use cases.

Conclusion

Solid state disks provide tremendous advantages in performance, reliability, power, weight, and noise over traditional hard disk drives. Continued improvements in cost per gigabyte are driving rapid replacement of HDDs by SSDs in consumer devices like laptops as well as enterprise data centers. Emerging technologies like 3D NAND will enable SSDs to reach new heights in speed and capacities that HDDs cannot match. The future of computer storage is solidly in the hands of solid state.