Skip to main content
QUICK REVIEW

[论文解读] Parallel Work Inflation, Memory Effects, and their Empirical Analysis

Umut A. Acar, Arthur Charguéraud|arXiv (Cornell University)|Sep 12, 2017
Parallel Computing and Optimization Techniques参考文献 13被引用 3
一句话总结

本文提出了一种轻量级、基于实证的方法,通过将观测到的加速比分解为三个组成部分来分析并行性能瓶颈:并行工作、空闲时间和工作膨胀——其中工作膨胀用于捕捉内存效应和通信开销。通过仅测量运行时间和空闲时间,该方法隔离了与内存相关的低效影响,使程序员能够以最少的代码插桩手段诊断和优化并行代码。

ABSTRACT

In this paper, we propose an empirical method for evaluating the performance of parallel code. Our method is based on a simple idea that is surprisingly effective in helping to identify causes of poor performance, such as high parallelization overheads, lack of adequate parallelism, and memory effects. Our method relies on only the measurement of the run time of a baseline sequential program, the run time of the parallel program, the single-processor run time of the parallel program, and the total amount of time processors spend idle, waiting for work. In our proposed approach, we establish an equality between the observed parallel speedups and three terms that we call parallel work, idle time, and work-inflation, where all terms except work inflation can be measured empirically, with precision. We then use the equality to calculate the difficult-to-measure work-inflation term, which includes increased communication costs and memory effects due to parallel execution. By isolating the main factors of poor performance, our method enables the programmer to assign blame to certain properties of the code, such as parallel grain size, amount of parallelism, and memory usage. We present a mathematical model, inspired by the work-span model, that enables us to justify the interpretation of our measurements. We also introduce a method to help the programmer to visualize both the relative impact of the various causes of poor performance and the scaling trends in the causes of poor performance. Our method fits in a sweet spot in between state-of-the-art profiling and visualization tools. We illustrate our method by several empirical studies and we describe a few experiments that emphasize the care that is required to accurately interpret speedup plots.

研究动机与目标

  • 为解决缺乏量化内存效应及其他性能因素对并行加速比相对影响的工具问题。
  • 使程序员能够隔离并诊断生产级并行代码中可扩展性差的原因。
  • 提供一种实用且低开销的替代方案,以替代可能扭曲性能测量结果的丰富插桩工具。
  • 可视化不同因素(开销、空闲、工作膨胀)如何随处理器数量增加而影响加速比趋势。

提出的方法

  • 该方法仅使用运行时间和空闲时间测量,将观测到的并行加速比分解为三个分量:并行工作、空闲时间和工作膨胀。
  • 它建立了一个数学等式,将观测到的加速比与这三个分量联系起来,其中仅并行工作和空闲时间可直接测量。
  • 工作膨胀通过等式间接推导得出,代表隐藏成本,如虚假共享、缓存一致性开销和同步开销。
  • 该方法受到工作-跨度模型的启发,但聚焦于实测执行数据而非理论最坏情况边界。
  • 它引入了因子化加速比图,用于可视化不同处理器数量下各性能因素的相对贡献与趋势变化。
  • 该方法仅需极少插桩——仅需对顺序基线、单处理器并行运行进行计时,并测量多处理器运行中的总空闲时间。

实验结果

研究问题

  • RQ1在并行程序中,加速比损失的多大比例可归因于内存效应和通信开销?
  • RQ2如何在无直接测量的情况下,将代表硬件级低效的‘工作膨胀’隔离并量化?
  • RQ3空闲时间与算法开销在现实世界并行应用中对可扩展性差的贡献程度如何?
  • RQ4一种轻量级、基于实证的方法是否能为生产代码提供比现有性能分析工具更具可操作性的洞察?

主要发现

  • 工作膨胀(包括内存子系统效应和同步成本)是可扩展性差的主要但常被忽视的原因。
  • 该方法仅通过运行时间和空闲时间测量,成功隔离了工作膨胀,从而能够精确诊断与内存相关的性能退化。
  • 因子化加速比图显示,在 Cilksort 和最大独立集基准测试中,可扩展性差主要源于工作膨胀和空闲时间,而非算法开销。
  • 该方法通过可视化性能因素随并行度增加而演变的过程,实现了对更大核心数下可扩展性趋势的准确外推。
  • 与传统性能分析工具相比,该方法在生产代码中的实用性与准确性更优,因为它避免了插桩引起的性能失真。
  • 实证研究表明,仅靠加速曲线不足以诊断根本原因;所提出的分解方法为优化提供了可操作的洞察。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。