关于「副本与纠删码的可靠性:二项模型、马尔可夫链与位腐烂巡检」,《书库冲突检测、可复现与纠删码》给出的定量结论是什么?

结论:第六章用二项窗口模型与马尔可夫链计算年数据丢失概率,说明两倍的相关故障加速会让 MTTDL 缩小 15.9 倍,五年一次巡检又不做逐块校验时,读取有 0.11820 的概率拿到错误字节。

数据口径:书中的书库规模、错误率、风险率与故障率均为示意参数;全部计算由书中程序生成;本书不是法律、财务、采购或存储服务建议。 第一章把书库画成知识图谱,说明卷数越多错误越难藏身:示意书库到 200 卷时,0.9821 的偏差定义处在可以被另一卷反驳的位置。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 15.9

schemeMTTDL 1 dapprox 1 dMTTDL 7 dlibrary loss
yearsyearsyearsper year, 7 d
2 copies4.472e+054.471e+056.395e+046.087e-01
3 copies2.693e+092.693e+095.504e+071.090e-03
RS(6+3)9.661e+109.653e+102.831e+083.533e-05
RS(10+4)2.198e+132.195e+139.229e+096.502e-07
RS(10+4), 7 d, failures 2x faster after the first: MTTDL / 15.9
RS(10+4), 7 d, failures 5x faster after the first: MTTDL / 615.2
查看完整验算程序
# Chapter 6. p62: mean time to data loss (MTTDL) from a continuous-time
# Markov chain. State i = number of failed disks in a stripe of n that
# survives m failures; i -> i + 1 at rate (n - i) lam B^min(i, 1), and
# i -> i - 1 at repair rate mu (one rebuild at a time). State m + 1 is
# data loss. Expected times to absorption are solved exactly by Gaussian
# elimination. lam from AFR 0.02; mu = 365 / R for a rebuild of R days;
# B > 1 makes the surviving disks fail faster once one has failed (same
# batch, same rack), a crude form of correlation. All values illustrative.
import math

AFR, BLOCKS = 0.02, 60000
LAM = -math.log(1 - AFR)


def mttdl(n, m, rdays, boost=1.0):
    mu = 365 / rdays
    size = m + 1
    a = [[0.0] * size for _ in range(size)]
    b = [1.0] * size
    for i in range(size):
        up = (n - i) * LAM * (boost if i else 1.0)
        down = mu if i else 0.0
        a[i][i] = up + down
        if i + 1 < size:
            a[i][i + 1] = -up
        if i:
            a[i][i - 1] = -down
    for c in range(size):
        for r in range(c + 1, size):
            f = a[r][c] / a[c][c]
            a[r] = [x - f * y for x, y in zip(a[r], a[c])]
            b[r] -= f * b[c]
    t = [0.0] * size
    for r in range(size - 1, -1, -1):
        rest = math.fsum([a[r][j] * t[j] for j in range(r + 1, size)])
        t[r] = (b[r] - rest) / a[r][r]
    return t[0]


def approx(n, m, rdays):
    mu = 365 / rdays
    den = math.prod(n - i for i in range(m + 1)) * LAM ** (m + 1)
    return mu ** m / den


SCHEMES = (("2 copies", 2, 1), ("3 copies", 3, 1), ("RS(6+3)", 9, 6),
           ("RS(10+4)", 14, 10))
print("{:<9} {:>12} {:>12} {:>12} {:>14}".format(
    "scheme", "MTTDL 1 d", "approx 1 d", "MTTDL 7 d", "library loss"))
print("{:<9} {:>12} {:>12} {:>12} {:>14}".format(
    "", "years", "years", "years", "per year, 7 d"))
for name, n, k in SCHEMES:
    m = n - k
    t7 = mttdl(n, m, 7)
    lib = -math.expm1(-(BLOCKS / k) / t7)
    print("{:<9} {:>12.3e} {:>12.3e} {:>12.3e} {:>14.3e}".format(
        name, mttdl(n, m, 1), approx(n, m, 1), t7, lib))
base = mttdl(14, 4, 7)
for beta in (2.0, 5.0):
    print("RS(10+4), 7 d, failures {:.0f}x faster after the first: MTTDL"
          " / {:.1f}".format(beta, base / mttdl(14, 4, 7, beta)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《超大规模双语专著库跨卷定理冲突检测、代码可复现性衰减防腐与冷存储纠删码》第 6 章「副本与纠删码的可靠性:二项模型、马尔可夫链与位腐烂巡检」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-182 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026182,
  author    = {Fan, Yafu},
  title     = {Cross-Volume Theorem-Conflict Detection in Large Bilingual Monograph Libraries, Anti-Decay of Code Reproducibility and Erasure-Coded Cold Storage},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论