# 强扩展

**强扩展**（Strong scaling）研究的是在总问题规模保持不变的前提下，随着处理器数量的增加，并行应用的性能如何变化。它衡量的是一个系统通过投入更多计算资源来加速一个固定规模问题的能力，与[弱扩展](https://www.edgepedia.org/zh/weak-scaling)相对——在弱扩展中，问题规模随处理器数量成比例增长。<sup>[1](https://www.osti.gov/servlets/purl/2565123)</sup><sup> • </sup><sup>[2](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 固定总问题规模下性能与处理器数量的关系；通常的测试在所有核心数下保持系统规模不变<sup>[1](https://www.osti.gov/servlets/purl/2565123)</sup><sup> • </sup><sup>[3](https://docs.hpc.strath.ac.uk/user-guide/scalability/)</sup> |
| 效率 | \( \eta_P = P_0\, t_{step}(P_0) / (P\, t_{step}(P)) \)，其中 \( P_0 \) 是能够容纳该问题的最小 rank 数<sup>[4](https://publications.anl.gov/anlpubs/2022/10/179266.pdf)</sup> |
| 理论极限 | 阿姆达尔定律：若串行部分占单处理器计算时间的 5%，则最大加速比被限制在 20<sup>[5](https://doi.org/10.1109/CLUSTER.2016.15)</sup> |
| 典型行为 | 随着处理器增加，每进程的域规模减小，通信开销增大，每进程的持续性能下降<sup>[2](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)</sup> |
| 大规模下的主要瓶颈 | 在一项大规模模拟研究中，集合通信的延迟是主要瓶颈，其开销随分布式 rank 数量线性增长<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC7338826/)</sup> |
| 标准化使用 | SPEChpc 2021 是一种基于时间的强扩展度量，在四个套件（Tiny、Small、Medium、Large）中以固定工作负载规模运行<sup>[7](https://www.spec.org/hpc2021/docs/overview.html)</sup> |

## 定义与度量

在强扩展测试中，处理器数量 \( n \) 增加，而总域规模即问题的总规模保持不变。<sup>[2](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)</sup> 常用的量是加速比——基线配置上的运行时间与 \( P \) 个处理器上的运行时间之比——以及并行效率，即加速比除以 \( P \)。

强扩展并行效率的一个典型定义是

\[
\eta_P := \frac{P_0\, t_{step}(P_0)}{P\, t_{step}(P)} = \frac{\mathrm{MDOFS}(P)}{\mathrm{MDOFS}(P_0)},
\]

其中 \( t_{step}(P) \) 是在 \( P \) 个 rank 上运行固定规模的固定问题时每步的时间，MDOFS(P) 是相应的每 rank 每秒百万自由度。这里 \( P_0 \) 是能够容纳该问题的最小 rank 数。等价的基于速度的形式为 \( S_P = \eta_P\, P\, S_1 \)，其中 \( S_P \) 是测得的总速度，例如以 FLOPS 或 MDOFS 为单位；当 \( P_0 = 1 \) 时两种定义一致。<sup>[4](https://publications.anl.gov/anlpubs/2022/10/179266.pdf)</sup>

基线选择很重要。经典的强扩展图展示加速比与进程数的关系，并设有一个加速比定义为 1 的参考点。最初使用单进程；如今单节点是自然的参考，也可以选择机架等其他点。双对数图具有优势，因为线性扩展仍是一条直线，而数量级能更好地分辨。<sup>[2](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)</sup>

## 阿姆达尔定律及其局限

强扩展受[阿姆达尔定律](https://www.edgepedia.org/zh/amdahls-law)限制，该定律出自 Gene M. Amdahl 1967 年发表于 AFIPS 的论文《单处理器方法实现大规模计算能力的有效性》（"Validity of the single processor approach to achieving large scale computing capabilities"），它假设每个问题都有一个固有的、无法并行化的串行部分。<sup>[8](https://doi.org/10.1145/1465482.1465560)</sup><sup> • </sup><sup>[5](https://doi.org/10.1109/CLUSTER.2016.15)</sup> 其后果是对加速比的绝对限制：如果串行部分相当于单处理器上计算时间的 5%，那么无论增加多少处理器，最大可能的加速比都是 20。<sup>[5](https://doi.org/10.1109/CLUSTER.2016.15)</sup>

该定律是一种简化，但仍能再现真实行为。SIESTA 电子结构代码的分析者指出，不应过于字面地理解其参数的常规解释，但阿姆达尔定律定性地捕捉了强扩展的普遍特征，且通常能很好地拟合实际数据；在任意核心数范围内拟合他们的强扩展数据，可得到一个单一的串行部分占比值，该值定义了代码在该范围内的效率。<sup>[9](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0095390)</sup>

## 强扩展与弱扩展

弱扩展同时增加问题规模和处理器数量，保持每处理器的问题规模不变。强扩展要难得多，因为随着处理器增多，每个处理器处理的工作负载比例变小，通信和同步很快会成为限制因素；这在弱扩展中不那么严重。由于古斯塔夫森定律将串行部分视为不受问题规模影响，它解释了弱扩展的优越表现：处理器数量翻倍，便可在相同时间内求解规模翻倍的问题，而当处理器数量趋于无穷时，可达到的加速比也趋于无穷。<sup>[5](https://doi.org/10.1109/CLUSTER.2016.15)</sup>

实际动机也不同。强扩展研究用于确定固定问题的最优进程数，可接受的效率取决于具体情境：越是需要缩短求解时间，可接受的效率就可以越低。<sup>[2](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)</sup> HPC 用户通常希望运行得尽可能快，尤其是大规模计算活动，因此他们希望 \( P \gg 1 \)。<sup>[4](https://publications.anl.gov/anlpubs/2022/10/179266.pdf)</sup>

## 什么限制了强扩展

**通信成本。** 当固定问题被分配给更多处理器时，每个处理器持有的数据更少，但相对于其工作量必须交换更多消息。一项在工作站集群上进行的系统研究——其中延迟、开销和带宽可以独立变化——发现应用对开销高度敏感：当开销从 3 微秒增加到 103 微秒时，32 个处理器上的应用减慢了 60 倍；而应用对延迟增加和每字节带宽降低的容忍度则出人意料地高；大多数应用对开销和每消息带宽都表现出高度线性的依赖关系。<sup>[10](https://homes.cs.washington.edu/~tom/pubs/martin-isca.html)</sup>

**大规模下的延迟。** 在细胞级脑组织模拟的分析性能建模中，网络延迟在大集群规模下始终是最重要的瓶颈，而在所研究的配置中网络带宽从未成为主导瓶颈。由于延迟开销随分布式 rank 数量线性增长，使用更多 rank 时性能会下降，作者得出结论：大规模模拟主要受集合通信延迟的制约。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC7338826/)</sup>

**内存与硬件约束。** 在某些架构上，每 GPU 的内存量相对较小，这妨碍了广泛的强扩展研究，因为固定问题只能分配给能够共同容纳它的那么多 rank。<sup>[4](https://publications.anl.gov/anlpubs/2022/10/179266.pdf)</sup> 由于算术性能的提升快于内存和网络带宽，优化数据移动已成为许多通信密集型应用实现强扩展的关键。<sup>[11](https://doi.org/10.1016/J.PARCO.2022.102904)</sup>

## 基准测试实践

强扩展已嵌入标准基准测试套件。SPEChpc 2021 是一种基于时间的强扩展度量：每个基准的性能比是参考机器上的时间除以被测系统上的时间，在四个套件中以固定工作负载规模运行，面向从单节点到数百节点的系统。由于工作负载固定，使用更多 rank 时扩展性会下降，如果使用过多 rank，基准甚至可能失败。<sup>[7](https://www.spec.org/hpc2021/docs/overview.html)</sup><sup> • </sup><sup>[12](https://spec.org/hpg/hpc2021/docs/index.html)</sup>

实践者用数值数据报告加速比或并行效率曲线，任何并行程序的加速比曲线在使用过多进程时都会向下弯曲。<sup>[3](https://docs.hpc.strath.ac.uk/user-guide/scalability/)</sup><sup> • </sup><sup>[2](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)</sup> 传统度量有一个已知缺陷：它们依赖于与同一输入上串行性能的比较，而对于大到无法在单个处理器上运行的问题，这是不可能的。[桑迪亚国家实验室](https://www.edgepedia.org/zh/sandia-national-laboratories)的研究员 Kenneth Moreland 和 Ron Oldfield 提出了基于速率的度量，其相对于加速比和效率具有具体含义，可以统一强扩展和弱扩展研究。<sup>[13](https://www.kennethmoreland.com/parallel-scaling-metrics/)</sup>

测量结果说明了各种可能的结果。在最近的一项可扩展性研究中，一种配置在强扩展下于 64 个节点上产生了 1.29 倍的加速比，使其成为使用更多资源时的更优选择。<sup>[1](https://www.osti.gov/servlets/purl/2565123)</sup>

## References

1. [Scalability of a parallel application: strong scaling definition and 64-node result, OSTI](https://www.osti.gov/servlets/purl/2565123)
2. [Benchmarking, Hamburg HPC Competence Center, University of Hamburg](https://www.hhcc.uni-hamburg.de/learning-hpc/getting-started-with-hpc-clusters-b/getting-started-with-hpc-clusters-b-y-benchmarking-b.html)
3. [Scalability, ARCHIE-WeSt Documentation](https://docs.hpc.strath.ac.uk/user-guide/scalability/)
4. [Strong-scaling parallel efficiency definition, Argonne National Laboratory publications](https://publications.anl.gov/anlpubs/2022/10/179266.pdf)
5. [A Model for Weak Scaling to Many GPUs at the Basis of the Linpack Benchmark, IEEE Cluster 2016](https://doi.org/10.1109/CLUSTER.2016.15)
6. [Understanding Computational Costs of Cellular-Level Brain Tissue Simulations Through Analytical Performance Models, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC7338826/)
7. [SPEChpc 2021 Overview, SPEC](https://www.spec.org/hpc2021/docs/overview.html)
8. [G. M. Amdahl (1967). Validity of the single processor approach to achieving large scale computing capabilities. AFIPS '67, pp. 483–485.](https://doi.org/10.1145/1465482.1465560)
9. [Performance Analysis of Electronic Structure Codes on HPC Systems: A Case Study of SIESTA, PLOS One](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0095390)
10. [R. Martin, A. Vahdat, D. Culler, T. Anderson (1997). Effects of Communication Latency, Overhead, and Bandwidth in a Cluster Architecture. ISCA '97, pp. 85–97.](https://homes.cs.washington.edu/~tom/pubs/martin-isca.html)
11. [Scalable communication for high-order stencil computations using CUDA-aware MPI, Parallel Computing](https://doi.org/10.1016/J.PARCO.2022.102904)
12. [SPEChpc 2021 Run and Reporting Rules documentation, SPEC](https://spec.org/hpg/hpc2021/docs/index.html)
13. [K. Moreland, R. Oldfield (2015). Formal Metrics for Large-Scale Parallel Performance. ISC High Performance, pp. 488–496.](https://www.kennethmoreland.com/parallel-scaling-metrics/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Servers, supercomputers & data centers › HPC benchmarks and metrics

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/strong-scaling

English original: https://www.edgepedia.org/strong-scaling
