{
  "schemaVersion": 1,
  "evidenceType": "deterministic-accounting-model",
  "generatedAt": "2026-10-19T17:39:50.236Z",
  "runtime": "v24.21.0",
  "license": "CC0-1.0 for original code and computed rows; sources retain their rights.",
  "scope": "One healthy, consistent parity row; complete equal-size block replacements. Cached inputs are coherent old blocks already available at the parity layer.",
  "counts": "cachedChanged: old values of replaced data; cachedUnchanged: unchanged data; cachedParity: old parity. All counts are integers, bounded by u, k-u and p respectively.",
  "method": "RMW reads u+p-cachedChanged-cachedParity. Reconstruct reads k-u-cachedUnchanged. Both write u+p. A tie is equal transfer count only.",
  "limits": "No elapsed-time, cache-admission, coherence-verification, journal, degraded-array or recovery policy model. A cache hit in a different layer is not an input here.",
  "sources": [
    {
      "url": "https://pdl.cmu.edu/PDL-FTP/RAID/computin.pdf",
      "locator": "Section 4.1.1, manuscript pp. 33-34",
      "accessed": "2026-10-19"
    },
    {
      "url": "https://www.kernel.org/doc/ols/2006/ols2006v2-pages-417-422.pdf",
      "locator": "Sections 3-4",
      "accessed": "2026-10-19"
    },
    {
      "url": "https://github.com/torvalds/linux/blob/v6.12/drivers/md/raid5.c#L3875-L4043",
      "locator": "uptodate_for_rmw and handle_stripe_dirtying",
      "accessed": "2026-10-19"
    }
  ],
  "artifacts": {
    "raid-write-costs.mjs": "130966c9656eef23dfa762c2d1f4c6a9ff5cad17789d189133083e35259acd3c",
    "raid-cache-costs.mjs": "657d7fe37fcd5542b9298138d47460486fb0d8948399802850740b9d81fa217d",
    "raid-cache-costs.test.mjs": "dda365f034e343234b8ac39f85460a665f33c80f10071df26c9c708c4c5ba960"
  },
  "rows": [
    {
      "label": "No old blocks",
      "rmw": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "rmw",
        "reads": 3,
        "writes": 3,
        "operations": 6,
        "hostBytes": 8192,
        "readBytes": 12288,
        "writeBytes": 12288,
        "operationsPerHostBlock": 3,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 3,
        "cachedChanged": 0,
        "cachedUnchanged": 0,
        "cachedParity": 0,
        "avoidedReads": 0
      },
      "reconstruct": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "reconstruct",
        "reads": 2,
        "writes": 3,
        "operations": 5,
        "hostBytes": 8192,
        "readBytes": 8192,
        "writeBytes": 12288,
        "operationsPerHostBlock": 2.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 2.5,
        "cachedChanged": 0,
        "cachedUnchanged": 0,
        "cachedParity": 0,
        "avoidedReads": 0
      },
      "preferred": "reconstruct"
    },
    {
      "label": "Old parity only",
      "rmw": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "rmw",
        "reads": 2,
        "writes": 3,
        "operations": 5,
        "hostBytes": 8192,
        "readBytes": 8192,
        "writeBytes": 12288,
        "operationsPerHostBlock": 2.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 2.5,
        "cachedChanged": 0,
        "cachedUnchanged": 0,
        "cachedParity": 1,
        "avoidedReads": 1
      },
      "reconstruct": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "reconstruct",
        "reads": 2,
        "writes": 3,
        "operations": 5,
        "hostBytes": 8192,
        "readBytes": 8192,
        "writeBytes": 12288,
        "operationsPerHostBlock": 2.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 2.5,
        "cachedChanged": 0,
        "cachedUnchanged": 0,
        "cachedParity": 1,
        "avoidedReads": 0
      },
      "preferred": "tie"
    },
    {
      "label": "Old changed data + parity",
      "rmw": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "rmw",
        "reads": 0,
        "writes": 3,
        "operations": 3,
        "hostBytes": 8192,
        "readBytes": 0,
        "writeBytes": 12288,
        "operationsPerHostBlock": 1.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 1.5,
        "cachedChanged": 2,
        "cachedUnchanged": 0,
        "cachedParity": 1,
        "avoidedReads": 3
      },
      "reconstruct": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "reconstruct",
        "reads": 2,
        "writes": 3,
        "operations": 5,
        "hostBytes": 8192,
        "readBytes": 8192,
        "writeBytes": 12288,
        "operationsPerHostBlock": 2.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 2.5,
        "cachedChanged": 2,
        "cachedUnchanged": 0,
        "cachedParity": 1,
        "avoidedReads": 0
      },
      "preferred": "rmw"
    },
    {
      "label": "Unchanged data only",
      "rmw": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "rmw",
        "reads": 3,
        "writes": 3,
        "operations": 6,
        "hostBytes": 8192,
        "readBytes": 12288,
        "writeBytes": 12288,
        "operationsPerHostBlock": 3,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 3,
        "cachedChanged": 0,
        "cachedUnchanged": 2,
        "cachedParity": 0,
        "avoidedReads": 0
      },
      "reconstruct": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "reconstruct",
        "reads": 0,
        "writes": 3,
        "operations": 3,
        "hostBytes": 8192,
        "readBytes": 0,
        "writeBytes": 12288,
        "operationsPerHostBlock": 1.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 1.5,
        "cachedChanged": 0,
        "cachedUnchanged": 2,
        "cachedParity": 0,
        "avoidedReads": 2
      },
      "preferred": "reconstruct"
    },
    {
      "label": "All old blocks",
      "rmw": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "rmw",
        "reads": 0,
        "writes": 3,
        "operations": 3,
        "hostBytes": 8192,
        "readBytes": 0,
        "writeBytes": 12288,
        "operationsPerHostBlock": 1.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 1.5,
        "cachedChanged": 2,
        "cachedUnchanged": 2,
        "cachedParity": 1,
        "avoidedReads": 3
      },
      "reconstruct": {
        "k": 4,
        "p": 1,
        "u": 2,
        "blockBytes": 4096,
        "strategy": "reconstruct",
        "reads": 0,
        "writes": 3,
        "operations": 3,
        "hostBytes": 8192,
        "readBytes": 0,
        "writeBytes": 12288,
        "operationsPerHostBlock": 1.5,
        "writeBytesPerHostByte": 1.5,
        "ioBytesPerHostByte": 1.5,
        "cachedChanged": 2,
        "cachedUnchanged": 2,
        "cachedParity": 1,
        "avoidedReads": 2
      },
      "preferred": "tie"
    }
  ]
}
