Why a Solid-State Drive Is a Mathematical System
Why is mathematics important in a solid-state drive? An SSD has no spinning platter, yet it performs an extraordinary sequence of calculations whenever a file is saved. It translates logical addresses into physical flash locations, groups writes into pages, erases larger blocks, distributes wear, detects corrupted bits, schedules commands and reports capacity through several different conventions. Binary arithmetic, modular mapping, probability, queues, optimisation and statistics all work together below the familiar folder icon.
The importance of mathematics becomes clear when a “1 TB” drive appears smaller in an operating system, when a nearly full drive slows during sustained writing, or when two workloads with the same number of bytes produce different amounts of internal work. These are not signs that arithmetic has failed. They show that storage has several layers and that each layer counts a different thing.
An SSD does not make data permanent by magic. Flash cells have finite endurance, controllers and firmware can fail, and silent corruption is a risk that systems manage rather than abolish. Mathematics helps engineers measure and reduce risk. It does not turn one device into a backup.
Quick Reading Routes
- Students: begin with bits, bytes, pages, blocks and address translation.
- Parents: read the capacity, backups and buying-claims sections.
- Teachers: use the write-amplification, queueing and probability investigations.
- Career explorers: connect this topic to electronics, firmware, operating systems, data centres, reliability engineering and cybersecurity.
Use only storage devices and data that you own or are authorised to test. Do not erase a family computer, school machine or shared drive for an experiment.
Bits, Bytes and Two Ways to Describe Capacity
Binary states become larger units
A bit records one of two logical states, written 0 or 1. Eight bits form a byte. Storage capacities then grow through powers of a base. Drive manufacturers commonly use decimal prefixes: one kilobyte is 1,000 bytes, one megabyte is 1,000,000 bytes and one terabyte is 1,000,000,000,000 bytes.
Computer systems also use binary multiples. One kibibyte is 1,024 bytes, one mebibyte is 1,048,576 bytes and one gibibyte is 1,073,741,824 bytes. The binary prefixes KiB, MiB and GiB remove ambiguity, although interfaces sometimes display “GB” while counting binary units.
Worked capacity conversion
A decimal 1 TB drive contains 1,000,000,000,000 bytes before formatting and system reservations. In gibibytes, that is
1,000,000,000,000 / 1,073,741,824 ≈ 931.3 GiB.
Nothing has vanished in this conversion. The number of bytes is unchanged; the size of the counting unit is different. Formatting, recovery areas, controller reservations and filesystem metadata can reduce the space available to a user further.
Capacity is not the same as usable data
A filesystem needs metadata to record filenames, directories, permissions, allocation and integrity information. An SSD controller may reserve flash that the user cannot address directly. This reserved capacity helps replace failed locations and gives the controller room for garbage collection and wear levelling.
Capacity questions should therefore state the layer:
- raw flash capacity;
- manufacturer-advertised capacity;
- operating-system formatted capacity;
- filesystem free space;
- application data after compression or redundancy.
Comparing numbers from different layers without labels produces apparent contradictions.
NAND Flash Stores More Than a Simple On-Off State
Threshold ranges represent symbols
NAND flash cells store charge-related states that a controller interprets through threshold-voltage ranges. A simplified single-level cell represents one bit and needs two logical states. A multi-level cell representing two bits needs four states. Three bits require eight states, and four bits require sixteen.
The pattern follows
number of states = 2^b,
where b is the number of bits represented by one cell. More bits per cell increase density, but the voltage ranges become closer together. Programming, reading and error management therefore become more demanding.
This is a genuine trade-off, not a ranking in which one design is always “better.” A high-density consumer drive and a high-endurance industrial drive can be optimised for different workloads, costs and retention requirements.
Noise turns a sharp boundary into a probability problem
In an ideal diagram, each threshold range is perfectly separated. In a physical device, manufacturing variation, temperature, program-and-erase history, charge loss and neighbouring-cell effects can shift measurements. A read decision asks which state is most plausible given a measured signal and calibrated boundaries.
If two distributions overlap, some raw reads will be wrong. Error-correcting codes and adaptive read strategies can recover many such errors. Reliability is therefore described through rates, margins and probabilities rather than the claim that every physical measurement is exact.
Did You Know?
Packing more bits into a cell does not mean that the cell “contains tiny written zeros and ones.” It means the controller maps measured physical states to digital symbols using carefully chosen thresholds and coding rules.
Pages, Blocks and the Erase-Before-Write Constraint
Reading and programming use pages
Flash is organised hierarchically. Data is commonly read and programmed in page-sized units. Many pages form an erase block. Exact sizes depend on the device and generation, so an article should not present one page or block size as universal.
The important asymmetry is conceptual: a page can be programmed, but reclaiming used flash generally requires erasing a larger block. The controller cannot treat every byte like a pencil mark that is freely overwritten in place.
A small update can create larger internal work
Suppose an application changes 8 KiB of useful data, while the relevant erase block contains 4 MiB of pages that include still-valid information. The controller may write the new version elsewhere, mark the old page invalid, and later consolidate valid pages from the block before erasing it.
The application requested an 8 KiB update, but the device may eventually move much more data. This gap leads to write amplification.
Write amplification factor
A simplified write amplification factor is
WAF = bytes written to flash / bytes written by the host.
If the host writes 100 GB while the controller programs 160 GB internally, the WAF is 1.6. Lower is generally desirable for endurance and sustained performance, but the measurement depends on workload, free space, firmware, compression and the interval observed.
A ratio below 1 can sometimes appear in systems that compress data before writing, because physical bytes are then smaller than logical host data. Definitions and measurement boundaries must be stated before comparing devices.
Logical Addresses and the Flash Translation Layer
The computer asks for logical blocks
An operating system typically addresses storage through logical block addresses. The SSD controller maps those logical addresses to physical flash locations. This flash translation layer lets a logical block be updated without forcing it to remain in one worn physical location.
The mapping resembles a function
physical location = F(logical address, current state).
Unlike a fixed arithmetic formula, F changes as the controller moves data, retires weak locations and balances wear. The mapping must survive power loss according to the device's design, because a correct data page is useless if the controller loses where it belongs.
Indirection creates flexibility
Address indirection lets the controller choose a clean page for a new write and update its mapping. It also allows background relocation. The price is metadata, memory and recovery complexity.
This same mathematical idea appears elsewhere. Virtual memory maps program addresses to physical memory. A database index maps keys to records. A postal system maps a name to a delivery location. Indirection separates the identity of an item from its current physical placement.
Mapping granularity is a design choice
Fine-grained mapping offers flexibility but uses more metadata. Coarser mapping reduces table size but may move more data during updates. Hybrid approaches combine levels. The design problem is an optimisation across memory cost, performance, recovery and write amplification.
Garbage Collection Is Resource Scheduling
Invalid pages still occupy blocks
When a logical page is replaced, the old physical page can become invalid. It no longer represents current user data, but the surrounding block cannot be reused until valid pages are copied elsewhere and the entire block is erased.
Garbage collection chooses victim blocks, moves their valid pages and returns erased blocks to the free pool. A simplified cost measure for a candidate block might depend on its number of valid pages, age, erase count and urgency.
Choosing the block with the fewest valid pages may reduce immediate copying. Yet repeatedly choosing the same easy blocks can create uneven wear. A controller balances short-term speed against long-term health.
Free space changes the geometry of choice
When many free pages are available, the controller has more placement options and can postpone expensive consolidation. As the drive becomes very full, choices narrow. More blocks may contain a mixture of valid and invalid pages.
This helps explain why sustained write behaviour can change as a drive fills. It does not justify a universal rule such as “every SSD becomes slow at exactly 80%.” The threshold depends on workload, controller policy, over-provisioning, flash type and the duration of the test.
TRIM communicates what is no longer needed
Deleting a file from a filesystem often removes directory references without immediately overwriting every old data location. A discard or TRIM command can tell the SSD which logical ranges no longer contain useful data. The controller can then treat corresponding physical pages as invalid during future garbage collection.
TRIM does not guarantee instant physical erasure, secure deletion or recovery impossibility. Those are separate security questions. It improves information available to the storage controller.
Wear Levelling Distributes a Finite Resource
Program-and-erase cycles accumulate
Flash blocks tolerate a finite number of program-and-erase cycles before error margins become harder to manage. Endurance is statistical and device-specific. Controllers track use and attempt to prevent a small set of blocks from wearing out far earlier than the rest.
Dynamic wear levelling spreads new writes among available blocks. Static wear levelling can also move cold, rarely changed data so that blocks holding it do not remain almost unused while other blocks absorb all updates.
A fairness example
Imagine four simplified blocks with erase counts 950, 960, 970 and 200. If every new erase is assigned only to the first three because the fourth contains static files, wear remains badly unbalanced. Moving the static data allows the low-count block to share future work.
One simple spread statistic is
maximum erase count – minimum erase count.
Reducing this spread can improve balance, but controllers may weight other factors. Moving data merely to equalise counts creates additional writes. Perfect equality is not free.
Over-provisioning creates a working reserve
Over-provisioned flash is physical capacity not presented as normal user-addressable storage. It gives the controller spare locations for remapping, garbage collection and wear levelling. A larger reserve can improve consistency and endurance under some workloads, at the cost of sellable or visible capacity.
The benefit is workload-dependent. A mostly read-only archive and a continuously updated database stress storage differently. Good engineering starts with a workload model rather than one marketing number.
Error Correction Uses Redundancy Intelligently
Detection and correction are different
An error-detecting code can reveal that stored data is inconsistent. An error-correcting code includes enough structured redundancy to infer and repair certain patterns of errors.
At a simple level, parity adds a bit chosen so that the number of ones is even or odd. A single parity bit detects any odd number of flipped bits, but it cannot identify which bit changed and can miss an even number of flips. Real flash systems use much stronger codes suited to their error patterns and density.
Redundancy consumes capacity
If k data bits are encoded into an n-bit codeword, the code rate is
R = k / n.
A rate near 1 uses less redundancy; a lower rate reserves more symbols for protection. More redundancy can improve correction capability, but costs storage, bandwidth and computation. The best code depends on expected errors, latency targets and controller resources.
Raw and uncorrectable error rates
Raw bit error rate describes errors before correction. The uncorrectable rate describes failures that remain after the code and retry mechanisms have done their work. Mixing these two measures can make a device look far worse or far better than it is.
Suppose a page contains 32,768 bits and each bit independently had a hypothetical raw error probability p. The expected number of raw errors would be 32,768p. Independence is a simplifying assumption; real errors can be clustered and vary across age, temperature and operation. A code must be evaluated against realistic patterns, not only a neat classroom distribution.
Checksums protect a different boundary
Storage systems may also use checksums to detect corruption across blocks or files. A checksum does not necessarily tell the SSD how to repair a failing flash page. End-to-end protection, device-level ECC and filesystem redundancy operate at different layers and should not be conflated.
Queues, Latency, IOPS and Throughput
One performance number cannot describe every workload
Latency is the time for an operation to complete. IOPS counts input/output operations per second. Throughput measures data transferred per second. These quantities are related but not interchangeable.
If a drive completes 50,000 random 4 KiB reads per second, the payload rate is approximately
50,000 × 4 KiB = 200,000 KiB/s,
or about 195.3 MiB/s. A sequential workload using large requests may reach much higher throughput with far fewer operations.
Queue depth changes opportunity and delay
Multiple outstanding commands give a controller chances to reorder and parallelise work across internal channels. Greater queue depth can increase throughput until a bottleneck is reached. It can also increase waiting time.
Little's Law gives a useful steady-state relationship:
average items in system = arrival rate × average time in system.
If 20 operations are outstanding on average and the completion rate is 10,000 operations per second, the corresponding average time is about 20/10,000 = 0.002 seconds, or 2 ms, under the assumptions of the model.
This does not prove that every request finishes in 2 ms. Tail latency can be much larger during garbage collection, thermal throttling or queue bursts.
Percentiles reveal the slow tail
An average can hide rare pauses. Report median latency alongside 95th, 99th or higher percentiles when user experience depends on occasional stalls. A system that is fast 99 times and slow once may feel worse than its mean suggests.
Benchmark conditions must state request size, read/write mix, random or sequential pattern, queue depth, fill state, duration, temperature and whether a fast cache was exhausted. Without those conditions, comparing headline speeds is weak evidence.
NVMe organises commands through queues
NVM Express defines an industry-standard interface for non-volatile memory over transports including PCI Express. Its architecture supports command submission and completion queues. The mathematical ideas are general: bounded buffers, indices, ordering, parallel service and interrupt or polling costs.
The NVM Express specifications are the authority for protocol details. Consumer product labels such as “NVMe” do not by themselves guarantee a particular sustained speed, endurance or thermal design.
Endurance Ratings Need Context
Total bytes written is an accounting measure
An endurance rating may be expressed as terabytes written over a warranty period or as drive writes per day. A simplified drive-writes-per-day calculation is
DWPD = total warranted bytes / (drive capacity × warranty days).
For a 1 TB drive rated for 600 TB written over five 365-day years,
DWPD = 600 / (1 × 1,825) ≈ 0.329.
This means roughly one-third of the nominal drive capacity written per day on average within that rating model. It is not a promise that failure occurs exactly after 600 TB, nor proof that every other component lasts indefinitely.
Workload matters
Small random updates can cause more metadata activity and write amplification than large sequential writes. Temperature, idle time, power-loss protection, firmware and available spare space also matter. Two users writing the same host-byte total can create different physical stress.
Endurance should be compared together with warranty terms, workload, data protection, sustained behaviour and the cost of downtime. One large number is not a complete risk analysis.
Reliability Is a System Property
One copy is one failure domain
An SSD can fail suddenly. A laptop can be stolen. Malware can encrypt files. A user can overwrite a folder. A power event can damage several components. Device reliability does not cover all these hazards.
A practical backup strategy keeps independent copies, uses at least one separate failure domain, and tests restoration. The familiar 3-2-1 idea—three copies, two media or storage types, one off-site—can be adapted to the value and sensitivity of the data. The counting rule is less important than genuine independence and successful restore tests.
RAID is not automatically a backup
Redundant arrays can improve availability after certain device failures. They may not protect against deletion, corruption copied across replicas, ransomware, controller mistakes, fire or theft. Availability and historical recovery are distinct objectives.
Encryption changes the recovery question
Encryption protects confidentiality when keys are managed correctly. Losing the only key can make intact storage unreadable. Key backups, recovery procedures and access control are therefore part of the mathematical system of risk.
A Complete Worked Example: A Student Media Project
A class is preparing 180 video clips averaging 240 MB each. Their estimated source data is
180 × 240 MB = 43,200 MB,
or 43.2 GB using decimal units. They also need 25 GB for edited versions, 12 GB for audio and graphics, and 10% working headroom on the combined project files.
The subtotal is 43.2 + 25 + 12 = 80.2 GB. Ten per cent headroom is 8.02 GB, giving 88.22 GB. This is not the whole procurement decision. The editing software, temporary render files, operating system and backup copies require separate allowance.
If the project produces temporary data equal to twice the final edited output, add 50 GB. The working estimate becomes 138.22 GB. A 256 GB-class SSD may have sufficient nominal capacity, but students should check actual free space rather than label capacity.
For protection, keeping the only project copy on that internal SSD is inadequate. The team might keep a versioned school-authorised copy and a separate external backup, with permissions that protect student data. The capacity calculation becomes a data-management plan.
Estimate transfer time honestly
At a sustained payload rate of 400 MB/s, an ideal 80,200 MB transfer would take
80,200 / 400 = 200.5 seconds.
Real time may be longer due to filesystem overhead, many small files, source speed, thermal behaviour, verification and interruptions. Report the ideal lower-bound calculation and measured result separately.
Safe Investigations for Students
Compare units without touching a drive
Convert advertised decimal capacities to GiB and explain the difference. Use 500 GB, 1 TB and 2 TB examples. Keep exact byte counts visible so the unit conversion cannot be mistaken for missing storage.
Model wear levelling with counters
Use 12 paper “blocks,” each with an erase counter. Simulate incoming writes under two policies: always choose the first available block, and choose among the least-used blocks. Compare maximum, minimum, mean and spread after 120 assignments.
Then add four blocks containing “cold data.” Decide when moving that data is worth the extra writes. This shows why static wear levelling is an optimisation problem rather than a slogan.
Simulate garbage collection
Draw blocks containing valid, invalid and free pages. Assign a cost equal to the number of valid pages that must be copied. Choose victim blocks and track copying. Repeat with different amounts of free space.
Analyse latency distributions
Use a teacher-provided dataset, not destructive testing on a school machine. Calculate mean, median, 95th percentile and maximum. Plot a histogram or empirical cumulative distribution. Explain which statistic best describes a typical click and which reveals a rare stall.
Common Misconceptions
“An SSD stores every file in one permanent location”
Logical addresses are mapped to physical flash, and the mapping can change as data is updated and wear is managed.
“Deleted means physically erased immediately”
Filesystem deletion, TRIM communication, garbage collection and secure erasure are different events.
“A 1 TB drive should display exactly 1,000 GB everywhere”
Interfaces may use different unit conventions, and usable space excludes metadata and reservations.
“The largest sequential speed makes the best drive”
Real suitability also involves latency, request size, queue depth, sustained behaviour, endurance, power, thermals and workload.
“Wear levelling prevents failure”
It distributes flash use. It cannot prevent every controller, firmware, power, connector or component failure.
“Error correction means backups are unnecessary”
ECC handles defined device-level error patterns. It does not recover stolen, deleted, encrypted or physically destroyed data.
How to Build Transferable Mathematics
Practise layer labels
For every number, name the layer and unit: host bytes, physical bytes, decimal GB, binary GiB, user-visible free space, average latency or percentile latency.
Estimate before benchmarking
Calculate a theoretical payload time, then compare it with measurement. Explain overhead rather than calling every gap a defect.
Use ratios with named numerators and denominators
Write amplification, code rate, utilisation and hit rate become clearer when their definitions are written in words before symbols.
Separate model from evidence
A classroom simulation illustrates policies. It is not a reverse-engineering claim about a particular proprietary controller. Mark assumptions and limitations.
Compare mechanisms, not brands alone
Ask how page size, free space, workload and queueing change outcomes. Product names can change; the mathematics transfers.
Guidance for Parents and Teachers
Ask for the reasoning chain
A strong explanation moves from cell state to page, block, address mapping, garbage collection, wear, error correction and system backup. It should not stop at “SSDs are faster.”
Keep experiments recoverable
Use diagrams, simulations, spare authorised media or read-only datasets. Never make a student's only copy part of a storage experiment.
Reward honest uncertainty
Controller algorithms and exact flash geometry may be proprietary or device-specific. Students should distinguish documented facts, reasonable models and unknown implementation details.
Connect to existing mathematics
This topic uses powers of two, ratios, functions, probability, descriptive statistics, optimisation and queues. It is an excellent bridge from school mathematics to computing.
Fast Write Caches and Sustained Performance
A short test may measure a cache, not the whole drive
Some SSDs temporarily use a region in a faster programming mode or stage data in volatile memory. A burst write can therefore complete at a high apparent rate until the cache is filled. Sustained input then depends on folding cached data into denser flash, garbage collection, temperature and available free blocks.
Suppose a 40 GB cache accepts data at 2,000 MB/s and the underlying sustained path manages 500 MB/s once the cache is full. Writing the first 40,000 MB ideally takes 20 seconds. A 100 GB transfer has another 60,000 MB at 500 MB/s, taking 120 seconds, for a simplified total of 140 seconds. Average rate is about 714 MB/s—not 2,000 MB/s and not 500 MB/s.
If the cache is replenished while the host pauses, later short bursts may again appear fast. A useful benchmark therefore states transfer size, preconditioning, idle time and whether the cache was exhausted.
Compression changes physical work
Some storage paths compress data, while many modern files such as videos and archives are already compressed. If a controller or filesystem stores fewer physical bytes for compressible input, write amplification and throughput comparisons can change. A benchmark using repeated zeros may not represent photographs, encrypted files or databases.
Use representative data or clearly label synthetic patterns. Never infer universal device speed from one convenient file type.
Sanitisation, Encryption and End-of-Life Mathematics
Overwriting logical addresses may miss remapped flash
Because the controller remaps logical addresses and retains spare locations, writing zeros over every visible logical block may not reach every historical physical page. Secure sanitisation should follow the device, organisation and applicable standards rather than an improvised overwrite count.
Cryptographic erasure can make encrypted data inaccessible by securely destroying the relevant keys, provided encryption was correctly designed and keys were not copied elsewhere. It is fast because it changes access to the information rather than individually programming every cell. Its effectiveness depends on the threat model and key lifecycle.
Risk is likelihood times consequence only as a first model
A simple risk score may multiply an estimated likelihood by consequence. If old student files have low probability of recovery but very high privacy impact, casual disposal is still unacceptable. Qualitative legal and ethical requirements can set a minimum control regardless of a numeric score.
Before selling, recycling or reassigning a device, identify data sensitivity, encryption state, device health and authorised sanitisation procedure. Verify completion and retain records where policy requires them.
Backups must also expire safely
Deleting the primary copy while forgotten backups remain does not achieve full retention policy. Map every copy and its restoration path. A retention schedule needs both recovery capability and a defined end-of-life process.
Reading Health Indicators Carefully
Drives may expose health and usage counters through management interfaces. Raw values and normalised fields are vendor- and device-specific. One counter should not be interpreted through a table written for another model.
A monitoring plan looks for trends, threshold alerts, media errors, spare capacity and unexpected resets while keeping independent backups. A “good” health label cannot prove that a device will not fail tomorrow. Conversely, a rising corrected-error count may show protection working while also signalling deterioration worth investigating.
Plot values against time and workload. A rate such as errors per terabyte read can be more informative than a lifetime count alone. Mark firmware updates and changes in workload so a discontinuity is not mistaken for spontaneous physics.
Frequently Asked Questions
Why does a 1 TB SSD show about 931 GiB?
The manufacturer counts one terabyte as one trillion bytes. One gibibyte is 1,073,741,824 bytes, so the same bytes equal about 931.3 GiB before additional formatting and reservations.
What is a NAND page?
It is a unit in which flash data is commonly read or programmed. Many pages form a larger erase block. Exact sizes vary by device.
Why can an SSD not simply overwrite one byte?
Flash programming and erasing operate at different granularities. Updates are normally written to new locations, while old pages are reclaimed later through block erasure.
What is wear levelling?
It is a family of controller strategies that distribute program-and-erase activity so a small set of blocks does not consume its endurance much earlier than others.
What is write amplification?
It is the ratio of physical flash writes to host-requested writes under a stated measurement boundary. Garbage collection and data movement can make it greater than one.
Does TRIM securely erase a file?
No. TRIM communicates that logical ranges are no longer needed. Secure deletion depends on the device, encryption, sanitisation method and threat model.
Is NVMe the same as NAND?
No. NAND is a type of non-volatile flash storage medium. NVMe is an interface and command architecture for non-volatile memory systems.
Which careers use this mathematics?
Storage firmware engineers, chip designers, operating-system developers, database engineers, reliability specialists, data-centre operators, forensic analysts and cybersecurity professionals all use parts of it.
Useful Next Reading
- NVM Express Base Specification and current specification family
- Why Mathematics? | Hard Disk Drives, Areal Density and Rotational Latency
- Why Mathematics? | Computer Cooling, Thermal Resistance, Heat Flow and Fan Curves
- Why Mathematics? | Spreadsheets, Cell References, Formulas, Floating-Point and Error Checking
The Larger Lesson
A solid-state drive shows why mathematics matters in technology. The user sees a file and a capacity number. Beneath them are state thresholds, powers of two, address mappings, constrained erasures, optimisation, redundancy, queues and risk models. Reliable storage emerges because these layers cooperate.
The transferable habit is to ask what is being counted, at which layer, under which workload and with what uncertainty. That habit helps a student evaluate storage claims today and many other engineered systems tomorrow.
