Deterministic accounting / no device measurements
RAID write costs: reads, writes and payload
56 deterministic RAID5/P+Q examples compare read-modify-write and reconstruct-write with explicit byte denominators. No device measurements or timing predictions.
Download CSV56 cases / 14 columnsJSON and provenance / Model code / Research explanation
Accounting assumptions
Healthy fixed-width parity rows with complete equal-size block replacements and cold cache. k data blocks, p parity blocks, u replacements. RMW reads u+p and writes u+p; reconstruct reads k-u and writes u+p. One transfer of one member block is one operation. Each row is independent. The two strategies have equal operation count when 2u+p=k.
At the same 16 KiB host payload, four isolated one-block RMW updates in a four-data-member RAID5 row use 16 member-block transfers. A coalesced full-row update uses 5. This comparison assumes no cache reuse between isolated updates; it is not a measured speedup.
| k | p | u | Strategy | Reads | Writes | Total | Operations / host block |
|---|---|---|---|---|---|---|---|
| 2 | 1 | 1 | RMW | 2 | 2 | 4 | 4 |
| 2 | 1 | 1 | Reconstruct | 1 | 2 | 3 | 3 |
| 2 | 1 | 2 | RMW | 3 | 3 | 6 | 3 |
| 2 | 1 | 2 | Reconstruct | 0 | 3 | 3 | 1.5 |
| 2 | 2 | 1 | RMW | 3 | 3 | 6 | 6 |
| 2 | 2 | 1 | Reconstruct | 1 | 3 | 4 | 4 |
| 2 | 2 | 2 | RMW | 4 | 4 | 8 | 4 |
| 2 | 2 | 2 | Reconstruct | 0 | 4 | 4 | 2 |
| 4 | 1 | 1 | RMW | 2 | 2 | 4 | 4 |
| 4 | 1 | 1 | Reconstruct | 3 | 2 | 5 | 5 |
| 4 | 1 | 2 | RMW | 3 | 3 | 6 | 3 |
| 4 | 1 | 2 | Reconstruct | 2 | 3 | 5 | 2.5 |
| 4 | 1 | 3 | RMW | 4 | 4 | 8 | 2.6667 |
| 4 | 1 | 3 | Reconstruct | 1 | 4 | 5 | 1.6667 |
| 4 | 1 | 4 | RMW | 5 | 5 | 10 | 2.5 |
| 4 | 1 | 4 | Reconstruct | 0 | 5 | 5 | 1.25 |
| 4 | 2 | 1 | RMW | 3 | 3 | 6 | 6 |
| 4 | 2 | 1 | Reconstruct | 3 | 3 | 6 | 6 |
| 4 | 2 | 2 | RMW | 4 | 4 | 8 | 4 |
| 4 | 2 | 2 | Reconstruct | 2 | 4 | 6 | 3 |
| 4 | 2 | 3 | RMW | 5 | 5 | 10 | 3.3333 |
| 4 | 2 | 3 | Reconstruct | 1 | 5 | 6 | 2 |
| 4 | 2 | 4 | RMW | 6 | 6 | 12 | 3 |
| 4 | 2 | 4 | Reconstruct | 0 | 6 | 6 | 1.5 |
| 8 | 1 | 1 | RMW | 2 | 2 | 4 | 4 |
| 8 | 1 | 1 | Reconstruct | 7 | 2 | 9 | 9 |
| 8 | 1 | 2 | RMW | 3 | 3 | 6 | 3 |
| 8 | 1 | 2 | Reconstruct | 6 | 3 | 9 | 4.5 |
| 8 | 1 | 3 | RMW | 4 | 4 | 8 | 2.6667 |
| 8 | 1 | 3 | Reconstruct | 5 | 4 | 9 | 3 |
| 8 | 1 | 4 | RMW | 5 | 5 | 10 | 2.5 |
| 8 | 1 | 4 | Reconstruct | 4 | 5 | 9 | 2.25 |
| 8 | 1 | 5 | RMW | 6 | 6 | 12 | 2.4 |
| 8 | 1 | 5 | Reconstruct | 3 | 6 | 9 | 1.8 |
| 8 | 1 | 6 | RMW | 7 | 7 | 14 | 2.3333 |
| 8 | 1 | 6 | Reconstruct | 2 | 7 | 9 | 1.5 |
| 8 | 1 | 7 | RMW | 8 | 8 | 16 | 2.2857 |
| 8 | 1 | 7 | Reconstruct | 1 | 8 | 9 | 1.2857 |
| 8 | 1 | 8 | RMW | 9 | 9 | 18 | 2.25 |
| 8 | 1 | 8 | Reconstruct | 0 | 9 | 9 | 1.125 |
| 8 | 2 | 1 | RMW | 3 | 3 | 6 | 6 |
| 8 | 2 | 1 | Reconstruct | 7 | 3 | 10 | 10 |
| 8 | 2 | 2 | RMW | 4 | 4 | 8 | 4 |
| 8 | 2 | 2 | Reconstruct | 6 | 4 | 10 | 5 |
| 8 | 2 | 3 | RMW | 5 | 5 | 10 | 3.3333 |
| 8 | 2 | 3 | Reconstruct | 5 | 5 | 10 | 3.3333 |
| 8 | 2 | 4 | RMW | 6 | 6 | 12 | 3 |
| 8 | 2 | 4 | Reconstruct | 4 | 6 | 10 | 2.5 |
| 8 | 2 | 5 | RMW | 7 | 7 | 14 | 2.8 |
| 8 | 2 | 5 | Reconstruct | 3 | 7 | 10 | 2 |
| 8 | 2 | 6 | RMW | 8 | 8 | 16 | 2.6667 |
| 8 | 2 | 6 | Reconstruct | 2 | 8 | 10 | 1.6667 |
| 8 | 2 | 7 | RMW | 9 | 9 | 18 | 2.5714 |
| 8 | 2 | 7 | Reconstruct | 1 | 9 | 10 | 1.4286 |
| 8 | 2 | 8 | RMW | 10 | 10 | 20 | 2.5 |
| 8 | 2 | 8 | Reconstruct | 0 | 10 | 10 | 1.25 |
Cache-residency extension
The 56 rows above and their files remain cold-cache examples. A separate extension counts coherent old blocks already available at the parity layer. With cD old changed-data blocks, cU unchanged data blocks and cP old parity blocks cached, RMW reads u+p-cD-cP; reconstruction reads k-u-cU. Both still write u+p. Incoming replacements are not cached old data. Valid contents and consistent starting parity are assumptions, not properties checked by this counter.
For k=4, p=1 and u=2, no cache gives three RMW reads versus two reconstruction reads. Retaining both old changed-data blocks and parity gives zero versus two. The explanation and table cover ties, unchanged-data residency and Linux v6.12's parity-consistency override.
Download the cache model, tests and five examples with provenance. Keep these modules and the original cold-cache model in one directory. No dependencies or device access are required.
node --test raid-cache-costs.test.mjsSix tests include 15,600 comparisons with an independent missing-block-set enumeration, invalid-input checks, cold-cache compatibility and an algebraic negative control for inconsistent parity. These checks establish arithmetic and assumptions, not a hardware speedup or a verified RAID implementation.
Parity placement and member writes
A separate nine-case calculation holds geometry fixed at five members and compares even, 80%-concentrated and dedicated parity. Full-row host-data fractions are 0%, 50% and 100%. Each result contains per-member writes per host block, their total and the busiest-to-quietest ratio. The original 56-row CSV is unchanged.
This is uniform-address write accounting, not a NAND wear model. The fraction weights host-data blocks, not requests; skewed addresses invalidate the uniform assumption. See the derivation and source review and Differential RAID definition.
Download the model, tests and results with assumptions and code hash. Keep the two modules together and run:
node --test diffraid-writes.test.mjsThe independent oracle enumerates actual data/parity destinations in 1,368 cases. Negative controls distinguish request counts from data volume and uniform addresses from a hot row. No devices are accessed.
Reproduce the cold-cache CSV
The module needs only Node.js; it performs no device I/O and uses no random seed or dependencies. With the linked module in the current directory, this command prints the identical CSV.
node --input-type=module -e 'import { toCsv } from "./raid-write-costs.mjs"; process.stdout.write(toCsv())'JSON includes SHA-256 hashes of the model and CSV. Generation time is not an observation period. Displayed ratios are rounded to four decimal places; CSV retains the numeric values.
Limits
- Synthetic arithmetic, not sampled observations, a benchmark or a paper replication. No confidence interval applies.
- All members are available. This is not an encoder, RAID simulator or degraded-write policy.
- RMW at u=k is forced as a comparison, not recommended or asserted controller behavior.
- Excludes caching, merged commands, journals, flushes, metadata, retries, CPU time and device-internal amplification.
- The 4 KiB block is an equal slice at the same offset across members, not a required configured RAID chunk size.
- Minimum transfer count is not a guaranteed minimum latency or maximum throughput.
Column definitions
- k
- Data blocks per parity row.
- p
- Parity blocks: 1 for RAID5, 2 for P+Q.
- u
- Complete data blocks replaced together in the same row.
- blockBytes
- Bytes per equal-size member block; illustrative 4096-byte input.
- strategy
- Forced rmw or reconstruct; not an observed controller choice.
- reads
- Member-block reads before parity calculation, with no cache hits.
- writes
- Changed-data plus parity member-block writes.
- operations
- Reads plus writes; counts, not seconds.
- hostBytes
- Replacement payload bytes: u times blockBytes.
- readBytes
- Member-interface bytes read.
- writeBytes
- Member-interface bytes written; excludes NAND-internal work.
- operationsPerHostBlock
- Member-block reads and writes divided by u.
- writeBytesPerHostByte
- Member write bytes divided by host payload bytes.
- ioBytesPerHostByte
- Member read plus write bytes divided by host payload bytes.
Sources and license
CC0-1.0 for Hesela's original model and generated rows. Cited works retain their own rights.
- Peter M. Chen, Edward K. Lee, Garth A. Gibson, Randy H. Katz and David A. Patterson. RAID: High-Performance, Reliable Secondary Storage. ACM Computing Surveys 26(2), 145-185 (1994). Author manuscript: sections 3.2.5-3.3.2, Table 3 and 4.1. (accessed 2026-10-11)
- Dan J. Williams. MD RAID Acceleration: Support for Asynchronous DMA/XOR Engines. Linux Symposium 2006, Volume Two, printed pp. 409-414; sections 3-5. The PDF filename uses different pagination. (accessed 2026-10-11)
- Linux kernel documentation: RAID 4/5/6 cache, write-back mode and implementation. Rolling documentation; accessed 11 October 2026. (accessed 2026-10-11)
Definitions: read-modify-write, reconstruct-write and full-stripe write.
Published by Hesela team
Report a correction · Editorial standards · Reuse guidance
Cite this page
Hesela team. RAID write costs: reads, writes and payload. Hesela. https://hesela.dev/datasets/raid-write-costs/