Consica Labs

Consica Labs
Chapter 6

Storage (HDD & SSD)

Where your files live when the power is off

Introduction

Imagine a library. RAM is the book you have open on your desk right now. Storage is the entire library — every book on every shelf, waiting to be picked up. When you close a book and put it back, it stays there until you need it again, even after the library closes for the night.

Your computer's storage drive holds everything: the operating system, your applications, photos, music, documents, and saved games. Unlike RAM, storage is non-volatile — it remembers everything even after you shut down the computer. There are two main types of storage drives: Hard Disk Drives (HDD) and Solid-State Drives (SSD).

How It Works

An HDD is like a record player with multiple vinyl records stacked on top of each other. A tiny arm moves back and forth to read or write music (data) on the spinning discs. An SSD is like a giant notebook with no moving parts — pages can be written or erased instantly using electricity.

Household Object Analogy

Think of an HDD as a filing cabinet where you have to spin the drawer open and flip through folders to find a document. An SSD is like having all your documents spread on a table — you can grab any one instantly. The filing cabinet holds much more but is slow; the table is fast but costs more per sheet.

Deeper Dive

An HDD stores data on one or more rigid platters coated with magnetic material. The platters spin at high speed — typically 5400 or 7200 RPM (revolutions per minute). A read/write head on a moving arm floats nanometers above the surface, magnetizing tiny regions to write data or detecting magnetic fields to read it.

To read a file, the arm moves the head to the correct track (seeking), waits for the platter to spin the right sector under the head (rotational latency), and then reads the data. This mechanical process is why HDDs are slower than SSDs — moving physical parts takes time measured in milliseconds.

Solid-State Drives (SSD)

An SSD has no moving parts. It uses NAND flash memory — billions of floating-gate transistors organized into pages and blocks. Each transistor traps electrons to represent a 0 or 1. Data is written in pages (typically 4 KB or 16 KB) but must be erased in larger blocks (several MB). This is called the write amplification problem.

Because SSDs access data electronically rather than mechanically, they are dramatically faster. A typical SATA SSD reads at about 500 MB/s, while a modern NVMe SSD using PCIe Gen 4 can read at over 7000 MB/s — that is 20 times faster than a fast HDD.

Advanced

HDDs use technologies like PMR (Perpendicular Magnetic Recording) or SMR (Shingled Magnetic Recording) to increase density. The fastest enterprise HDDs reach speeds around 260 MB/s with capacities up to 30 TB. The performance bottleneck is always mechanical: seek time (typically 4-15 ms) and rotational latency (half a rotation at 7200 RPM = 4.17 ms).

SSDs use a flash translation layer (FTL) that maps logical addresses from the OS to physical NAND locations. The FTL handles wear leveling (distributing writes evenly), garbage collection (consolidating valid data from partially-filled blocks), and bad block management. Modern SSDs use 3D NAND with layers stacked vertically — up to 238 layers in 2025 products — to increase density without shrinking individual cells.

SSDs connect via SATA (6 Gbps, ~550 MB/s real-world) or NVMe over PCIe (up to 32 Gbps per Gen 5 lane). The NVMe protocol was designed specifically for SSDs, supporting deep command queues and parallel I/O, while the older AHCI protocol (used with SATA) was designed for spinning disks and adds unnecessary overhead.

HDD vs SSD Comparison

Feature HDD SSD
SpeedSlow (80-260 MB/s)Fast (500-7000+ MB/s)
Moving PartsYes (spinning platters, moving arm)No (all electronic)
DurabilityFragile — damaged by drops and bumpsTough — no moving parts to break
NoiseAudible (spinning and clicking)Silent
Power UsageHigher (6-10 W)Lower (2-5 W)
Cost per GBCheap (~$0.02/GB)More expensive (~$0.08/GB)
Max CapacityUp to 30 TBUp to 8 TB (consumer) / 30 TB (enterprise)
Best ForLarge media archives, backupsOS, apps, games, active projects

Vocabulary Table

Term Definition
HDDHard Disk Drive; mechanical storage using spinning magnetic platters
SSDSolid-State Drive; electronic storage using NAND flash memory
NAND FlashA type of non-volatile memory that stores data in floating-gate transistors
PlatterA spinning magnetic disc inside an HDD where data is stored
Read/Write HeadA tiny electromagnetic component that reads and writes data on HDD platters
SATASerial ATA; a standard interface for connecting drives (up to 6 Gbps)
NVMeNon-Volatile Memory Express; a fast protocol for SSDs over PCIe
FragmentationFiles split into pieces scattered across an HDD, slowing read speed
TRIMAn SSD command that tells the drive which data blocks are no longer in use
Wear LevelingAn SSD technique that distributes writes evenly to extend drive life

Fun Facts

The first HDD, IBM's 305 RAMAC (1956), weighed over a ton and stored just 5 MB of data — about the size of one MP3 song.

An HDD read/write head flies at just 3 nanometers above the platter — that is 1/10,000th the width of a human hair. If a dust particle gets in, it can cause a "head crash."

A typical SSD has no moving parts and can survive a drop from 5 feet while operating. An HDD dropped just 6 inches while running can suffer permanent damage.

The fastest consumer NVMe SSDs in 2025 can transfer an entire 100 GB game in under 15 seconds. A typical HDD would take over 6 minutes.

Solid-state drive technology dates back to the 1950s with core memory, but the first modern SSD for consumers was released by Intel in 2008 with just 80 GB of capacity.

Interactive Diagram

Launch the interactive diagram to see this in action.

Open Interactive Diagram

The interactive diagram for this chapter demonstrates Storage — HDD and SSD. It shows a comparison between HDD (spinning disk) and SSD (flash chips) showing how data is stored and accessed.

What to explore:

  • toggle between HDD and SSD views; click to save and retrieve files; watch the speed difference as data is accessed
  • SSDs are faster and more durable than HDDs because they use flash memory with no moving parts

Knowledge Check

1. What is the main difference between an HDD and an SSD?

Answer: HDD uses moving parts, SSD uses electronic memory

2. Which interface is the fastest for SSDs?

Answer: NVMe over PCIe

3. Which type of storage is more resistant to physical damage from drops?

Answer: SSD (no moving parts to break)

4. True or False: Turning off your computer causes storage drives to lose all data, just like RAM.

Answer: False. Storage is non-volatile — it keeps data even without power.

5. True or False: HDDs are generally cheaper per gigabyte than SSDs.

Answer: True. HDDs offer more storage for the same price, making them better for bulk storage.

6. Matching: Connect each term to its description.

1. NVMe
A. Magnetic discs that spin inside an HDD
2. Platter
B. Fast protocol designed for SSDs
3. TRIM
C. Command that tells SSD which blocks are free

Answer: 1-B, 2-A, 3-C

7. Fill in the blank: The technology that distributes writes evenly across an SSD to extend its life is called ____.

Answer: wear leveling

8. Fill in the blank: When an HDD file is split into pieces stored in different locations, this is called ____.

Answer: fragmentation