How a hard drive actually works
Inside the sealed case, a stack of polished discs spins at 7,200 revolutions a minute while an arm holds a sensor two nanometres above the surface — a gap so small that a smoke particle would be a boulder. It has to find any one of several billion magnetic regions, and it has to do it without ever touching anything.
A bit is a patch of metal pointing one way
Everything a hard drive does rests on one property of certain materials: magnetise a small region and it stays magnetised after the field is removed. That persistence is the storage. No power is needed to hold it, which is why a drive in a drawer still has your files in ten years.
The platter is not iron. It is a substrate — aluminium alloy or glass — coated with an extremely thin film of a magnetic alloy, typically cobalt-based, only tens of nanometres deep. Within that film, a bit is a tiny region whose magnetic orientation has been set one way or the other.
The change is the bit, not the direction
A detail that trips people up: the drive does not read 'north means 1'. It detects transitions. As the surface moves past the sensor, a change in magnetisation induces a voltage spike; no change produces nothing. The data is encoded in the pattern of flips, not the absolute orientations.
This matters because it means the drive must never encounter a long run of identical values — with no transitions there is no signal, and the drive loses track of where it is. Encoding schemes deliberately break up long runs, which is the same problem line codes solve elsewhere in communications.
Turning the bits on their side
For decades the magnetic regions lay flat in the plane of the disc — longitudinal recording. As they were made smaller to fit more in, they approached a limit: below a certain size, ambient heat alone can flip a region at random. Data would simply rot. This is the superparamagnetic limit, and around 2005 the industry ran into it.
Reading and writing use different physics
Writing is straightforward electromagnetism: pass current through a tiny coil and the resulting field sets the orientation of the region passing underneath. Reading is subtler. Modern drives use a magnetoresistive sensor — a material whose electrical resistance changes in a magnetic field.
The effect exploited is giant magnetoresistance, discovered in 1988 and awarded the Nobel Prize in Physics in 2007. It is dramatically more sensitive than the induction coils it replaced, and that sensitivity is precisely what allowed regions to shrink. It is a rare case of a fundamental physics discovery reaching consumer products within a decade.
The takeaway A bit is a microscopic region of magnetic film, standing on end, read by a sensor whose resistance changes in a magnetic field. Nothing needs power to keep it there.
The head flies; it must never land
The read-write head does not touch the disc. It does not hover magnetically or ride on bearings. It flies, aerodynamically, on the layer of air being dragged round by the spinning platter — at a height that is genuinely difficult to believe.
The head sits on a slider, a small block shaped like an aerofoil. As the platter spins it drags air with it, and the slider's shape generates just enough lift to balance the spring pressing it down. The result is a stable flying height of around two nanometres in a modern drive.
The usual analogy is worth stating properly. Scale the head up to the size of a Boeing 747 and it is flying a few millimetres above the ground, following a painted line a few centimetres wide, at several thousand miles an hour, counting blades of grass as it goes.
Why the case is sealed
At a two-nanometre flying height, ordinary airborne particles are catastrophic. A smoke particle is hundreds of times larger than the gap; a fingerprint is a mountain range. A drive opened in a normal room is finished — not immediately, but as soon as debris finds its way under a head.
The case is not a vacuum. It is filtered and pressure-equalised through a small breather hole with a filter behind it, because the head needs air to fly on. High- capacity drives are instead sealed and filled with helium, which is far less dense — less turbulence, less drag, less power, and stable enough flying to allow more platters in the same height.
A head crash
If the head contacts the surface at speed, it gouges the magnetic film and throws off debris which then damages more of the surface, often on every platter. This is a head crash, and it is why a dropped running drive frequently does not merely have bad sectors but is destroyed.
When a drive spins down, the heads are moved off the data area entirely — either onto a textured landing zone near the centre, or, in almost all modern drives, unloaded onto a ramp outside the platter edge. An accelerometer in laptop drives triggers this within milliseconds of detecting a fall.
The takeaway The head flies on a cushion of moving air two nanometres thick. Every design decision — the seal, the filter, the helium, the parking ramp — exists to stop it ever touching down.
How it finds one sector among billions
The surface is divided into concentric rings, and each ring into blocks. Getting to a specific block means two mechanical movements, and those movements are the reason a hard drive is slow in a way that has barely improved in thirty years.
Track
One concentric circle on one surface. A modern platter has hundreds of thousands of them.
Cylinder
The same track on every surface at once. The heads move together, so all of these are reachable without moving the arm.
Sector
The smallest addressable unit — 512 bytes historically, 4,096 in every modern drive.
Head
Each platter has two usable sides, each with its own head.
Two delays, and only one of them is improving
Reading a sector requires the arm to swing to the right track — seek time — and then waiting for the sector to come round under the head — rotational latency. Both are mechanical, and both are enormous compared with electronics.
| Drive type | Average seek | Average latency | Total |
|---|---|---|---|
| 7,200 rpm desktop | ~9 ms | 4.2 ms | ~13 ms |
| 5,400 rpm laptop | ~12 ms | 5.6 ms | ~18 ms |
| 10,000 rpm enterprise | ~4 ms | 3.0 ms | ~7 ms |
| 15,000 rpm enterprise | ~3 ms | 2.0 ms | ~5 ms |
| SSD, for comparison | 0 ms | 0 ms | ~0.05 ms |
Average rotational latency is exactly half a revolution, because on average the sector you want is halfway round. At 7,200 rpm one revolution takes 8.3 milliseconds, so the average wait is 4.2. This is arithmetic, not engineering — the only way to reduce it is to spin faster, which costs power, noise and heat.
Why random access is so much worse than sequential
Reading a large file stored in order means one seek followed by a continuous stream — perhaps 200 megabytes a second. Reading ten thousand small files scattered across the disc means ten thousand seeks, at 13 milliseconds each, and the same drive manages a couple of megabytes a second.
A hundredfold difference between best and worst case, on identical hardware, is why defragmentation mattered so much on mechanical drives and why booting Windows from one is such a miserable experience. Booting is thousands of small scattered reads, the exact workload a hard drive handles worst.
The outer tracks are faster
An outer track is physically longer, so it holds more sectors and more of them pass under the head per revolution. Manufacturers exploit this with zone bit recording, packing more sectors into outer zones rather than wasting the space.
The consequence is that the same drive is meaningfully faster at the start of its address range than at the end — often by a factor of two. Benchmarks that show a declining line as they progress are measuring precisely this, and it is why operating systems used to be installed at the beginning of a disc.
The takeaway Every access costs a seek plus half a rotation. Sequential reading amortises that over a lot of data; random reading pays it every single time.
SATA: how the drive and the computer talk
The interface is the agreement about wires, voltages and commands. Its history is a steady retreat from doing many things at once in parallel to doing one thing extremely fast in series — which is counterintuitive until you see why.
Its predecessor, PATA, sent 16 bits at a time down a 40-wire ribbon cable as wide as your hand. The obvious way to go faster was more wires, and for a while it worked.
Why parallel stopped working
Sixteen signals sent simultaneously must arrive simultaneously. As speeds rose, tiny differences in wire length and electrical properties meant bits arrived at slightly different times — skew — and adjacent wires interfered with each other. Both problems get worse as you go faster, and they cannot be engineered away indefinitely.
Serial interfaces dodge all of it. One differential pair, one bit at a time, no skew because there is nothing to skew against, and excellent noise rejection because interference hits both wires of the pair equally and cancels. Freed of those constraints, the clock rate went far higher than parallel could reach — and one very fast lane beat sixteen slow ones.
| Generation | Year | Raw rate | Usable |
|---|---|---|---|
| SATA 1.0 | 2003 | 1.5 Gbps | ~150 MB/s |
| SATA 2.0 | 2004 | 3 Gbps | ~300 MB/s |
| SATA 3.0 | 2009 | 6 Gbps | ~600 MB/s |
| SATA 3.2 / Express | 2013 | 16 Gbps | Largely bypassed for NVMe |
SATA has stayed at 6 Gbps since 2009, and for mechanical drives that is entirely sufficient — no hard drive comes close to saturating it. It became a real constraint only for SSDs, which is why they moved to NVMe over PCIe instead.
AHCI, and what the drive is actually told
Over the wire, the computer does not send 'move the arm'. It sends a command such as 'read 64 sectors starting at logical block 1,048,576'. The drive's own controller translates that logical address into a physical head, track and sector — a mapping the computer never sees.
This indirection is what allows the drive to quietly remap bad sectors to spare ones, use zone bit recording, and reorganise internally, all without the operating system needing to know anything about its physical geometry. The reported geometry of a modern drive is a polite fiction.
The takeaway One very fast serial lane beat sixteen parallel ones because skew and crosstalk cap how fast parallel can go. The computer addresses logical blocks; the drive alone knows where they physically are.
NCQ: doing the work in a smarter order
Given several things to fetch from scattered places on a spinning disc, doing them in the order requested is rarely the fastest choice. Native Command Queuing lets the drive decide the order itself — and it is the closest thing a mechanical drive has to a free performance upgrade.
The problem is exactly the lift problem. A lift asked to visit floors 5, 2 and 4 does not serve them in that order; it goes 2, 4, 5. A drive head asked for sectors scattered across the platter faces the same choice, with the added complication that the disc is rotating while it decides.
Rotational position matters as much as distance
The clever part is that NCQ optimises for more than arm travel. The drive can calculate, for each pending request, how long it would take to seek there and how long it would then wait for rotation. A track slightly further away whose sector is about to arrive beats a nearer track whose sector has just passed.
This is rotational position ordering, and it is why NCQ delivers more than the simple lift algorithm would suggest. Only the drive has the information to do it.
Where the gain actually shows up
| Workload | Benefit from NCQ |
|---|---|
| Single large sequential read | None — there is nothing to reorder |
| Copying one big file | Very little |
| Booting the operating system | Noticeable |
| Database or mail server | Substantial — often 50% or more |
| Several programs at once | Substantial |
| Virtual machine host | Very large |
The pattern is clear: NCQ helps exactly when many independent requests are outstanding at the same time. A single user copying a file gives it nothing to work with; a server with thirty concurrent operations gives it a great deal.
Starvation, and the promise not to forget
A naive reordering scheme could leave one unlucky request permanently deferred as better-positioned ones keep arriving. NCQ implementations therefore track how long each request has waited and force through anything that has been queued too long, accepting a slower overall result to guarantee nothing is abandoned.
SATA NCQ allows up to 32 outstanding commands. That is ample for a mechanical drive, which cannot usefully work on more, and it became a serious limitation for SSDs — NVMe raised it to 65,535 commands across 65,535 queues, which is the subject of the SSD guide.
The takeaway The drive reorders pending requests using knowledge only it has: head position, sector layout and exactly where the platter has rotated to. It helps most when many requests are in flight at once.
From 5 megabytes to 30 terabytes
The first hard drive held five megabytes, weighed a tonne and was delivered by forklift. The trajectory since is one of the steepest in engineering history, and the techniques keeping it going now involve lasers and deliberate compromises.
IBM's RAMAC 350 shipped in 1956: fifty 24-inch platters, five megabytes, the footprint of two refrigerators, and rented for about 3,200 dollars a month. Storage cost roughly 10,000 dollars per megabyte.
That is roughly a six-million-fold increase in capacity, with cost per gigabyte falling from millions of dollars to about a penny. Very little else in engineering has moved that far.
Where the gains came from
- Thin-film heads replaced hand-wound coils, allowing far smaller and more precise sensors.
- Magnetoresistive heads, then giant magnetoresistive ones, made reading sensitive enough for much smaller regions.
- Perpendicular recording stood the bits on end, giving roughly a tenfold density increase in one step.
- Helium filling cut turbulence and drag, allowing more platters in the same height and less power.
- Shingled recording overlapped tracks like roof tiles for extra density, with a significant cost described below.
- HAMR uses a laser to heat a spot for a fraction of a nanosecond so it can be written, then lets it cool into stability.
HAMR, and why heat helps
The recurring obstacle is a genuine trade-off. Magnetic regions must be stable enough to resist random thermal flipping, which means using a material that strongly resists changing — but then the write head cannot change it either.
Heat-assisted magnetic recording resolves this by aiming a laser at the exact spot being written, heating it to several hundred degrees for around a nanosecond. Hot, it flips easily; as it cools within nanoseconds it becomes extremely stable. The drive contains a laser writing data onto a disc it is briefly melting the magnetic resistance of, thousands of times a second, for years.
SMR: the compromise worth knowing about
Shingled magnetic recording overlaps tracks, because a write head is wider than a read head. This gains perhaps 25 percent capacity and introduces a serious consequence: you cannot rewrite one track without destroying its overlapping neighbours, so the drive must read the whole band, modify it and rewrite it.
An SMR drive is fine for write-once, read-many use — backups, archives, media libraries. It is poor for anything with sustained random writes, and it caused a genuine scandal around 2020 when manufacturers shipped SMR drives without labelling them, including into NAS units where rebuilding an array could take weeks instead of hours.
The takeaway Six steps, a head flying two nanometres up and a laser briefly heating the disc — and mechanical drives survive not by being fast, which they are not, but by being about five times cheaper per terabyte than anything else.