关于「问题会长大吗:古斯塔夫森定律、逐项审批与实测串行份额」,《单兵指挥与串行瓶颈》给出的定量结论是什么?
结论:古斯塔夫森定律说,问题随处理器数目长大时,串行部分的份额被摊薄,加速比可以接近线性;程序 p21 显示,1,024 个处理器上 0.004 的并行机串行份额对应 1019.9 倍的规模扩展加速比。程序 p22 显示,当每一份产出都要占用主事者 12 分钟时,问题长大也无济于事,加速比在四个智能体处就停在 5.000 倍。程序 p23 显示,卡普—弗拉特指标可以把固定的串行份额与随规模增长的开销区分开。可是 \(\min(N/a,1/r)\) 只是一个乐观的上界:智能体交来的产出并不均匀,主事者的审查时间也有长有短。随机性会让主事者门前排起多长的队?这是下一章的问题。
数据口径:示意参数下,把串行份额从两成降到半成使加速比增加 3.325,把智能体从十个加到一百个只增加 1.236。 书中参数均为示意;全部计算由书中程序生成。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.004, 1019.9, 1024
| N | 1,024 processors |
| s' S_G Amdahl s S_Amdahl | |
| 0.004 | 1019.9 0.00000392 1019.9 |
| 0.006 | 1017.9 0.00000589 1017.9 |
| 0.008 | 1015.8 0.00000788 1015.8 |
| reported speedups (Gustafson 1988): | |
| beam stress | 1,021 implied s' = 0.0029 |
| surface wave | 1,020 implied s' = 0.0039 |
| fluid flow | 1,016 implied s' = 0.0078 |
| the fixed-size ceiling for s' read as Amdahl's s: | |
| s | 0.004 S(1,024) = 201.1 1/s = 250.0 |
| s | 0.008 S(1,024) = 111.5 1/s = 125.0 |
查看完整验算程序
# Chapter 2. p21: Gustafson's scaled speedup on 1024 processors.
# Model: Gustafson (1988) measures the serial share s' on the parallel
# machine itself and lets the problem grow with N, so the scaled
# speedup is S_G = s' + (1 - s') N. He reported s' of 0.4 to 0.8
# percent and measured speedups of 1021, 1020 and 1016 on N = 1024.
# The same run seen through Amdahl's fixed-size lens has the much
# smaller share s = s' / (s' + (1 - s') N), giving the same number.
# Source values from Gustafson (1988); the rest is arithmetic.
from fractions import Fraction as F
N = 1024
REPORTED = [("beam stress", 1021), ("surface wave", 1020),
("fluid flow", 1016)]
print("N = {:,} processors".format(N))
print("%8s %10s %14s %10s" % ("s'", "S_G", "Amdahl s", "S_Amdahl"))
for sp in [F(4, 1000), F(6, 1000), F(8, 1000)]:
sg = sp + (1 - sp) * N
s = sp / (sp + (1 - sp) * N)
sa = 1 / (s + (1 - s) / N)
print("%8.3f %10.1f %14.8f %10.1f" % (float(sp), float(sg),
float(s), float(sa)))
print("reported speedups (Gustafson 1988):")
for name, v in REPORTED:
sp = F(N - v, N - 1)
print(" %-12s %6s implied s' = %.4f" % (
name, "{:,}".format(v), float(sp)))
print("the fixed-size ceiling for s' read as Amdahl's s:")
for sp in [F(4, 1000), F(8, 1000)]:
sa = 1 / (sp + (1 - sp) / N)
print(" s = %.3f S(1,024) = %6.1f 1/s = %6.1f" % (
float(sp), float(sa), float(1 / sp)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《单兵硅基帝国宪章学、串行总司令决策带宽与阿姆达尔串行瓶颈破局母典》第 2 章「问题会长大吗:古斯塔夫森定律、逐项审批与实测串行份额」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-253 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026253,
author = {Fan, Yafu},
title = {Constitutional Engineering for a One-Commander Silicon Empire: Serial Decision Bandwidth and Breaking Amdahl's Bottleneck},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}