miuradio
How Computers WorkHow the computer in your hands really works.›

How Computers Work

Why does a nearly full drive get so slow?

Premieres tomorrow. Follow to see it first.

Story

Flash can't write over a page. Your change goes to an empty page, the old copy is marked stale, and the drive can only erase whole blocks of pages at once. When empty pages run out, it cleans up: it copies the pages still in use out of a block, then erases it. Half full, the block it cleans is mostly stale, so there's almost nothing to copy. Nearly full, almost every page is still in use, so it copies and copies before it can save yours.

In our simplified simulation (blocks of 64 pages, 7 % spare flash, small random saves, the 2008 flash timings Microsoft Research published), a drive 98 % full writes about 6 pages for every page you save, and each small save takes about 5 times as long as on a half-full drive. At three quarters full it's under 2. Real drives hide part of this behind caches and spare flash, so one small save often feels fine; ours leaves that out. Engineers call it write amplification, and it wears the flash faster too.

In 2008, researchers at Microsoft wrote that "the SSD is always full with respect to its advertised capacity": the drive never learns which files you deleted. Today your computer tells it, with a command called Trim.

Free space isn't wasted. It's where your drive does its work.

How full is your drive right now?

Sources: N. Agrawal, V. Prabhakaran, T. Wobber, J. D. Davis, M. Manasse and R. Panigrahy, Design Tradeoffs for SSD Performance, USENIX Annual Technical Conference 2008; X.-Y. Hu, E. Eleftheriou, R. Haas, I. Iliadis and R. Pletka, Write Amplification Analysis in Flash-Based Solid State Drives, SYSTOR 2009; P. Desnoyers, Analytic Modeling of SSD Write Performance, SYSTOR 2012; Microsoft, Engineering Windows 7: Support and Q&A for Solid-State Drives, 2009; Apple File System Guide; our own measurement and simulation.
Sounds and music: made by us.

Link copied