[论文解读] Tuning MPI Collectives by Verifying Performance Guidelines
该论文提出 PGMPITuneLib,一个运行时库,通过基于自洽性能准则,将低效的 MPI 集体操作实现替换为语义等价的模拟函数,自动调优 MPI 集体操作。通过将实际 MPI 性能与这些准则进行比较,系统能够识别并应用更快的算法模式,在各种 MPI 库中显著降低延迟,即使在无可调参数的库中也有效。
MPI collective operations provide a standardized interface for performing data movements within a group of processes. The efficiency of collective communication operations depends on the actual algorithm, its implementation, and the specific communication problem (type of communication, message size, number of processes). Many MPI libraries provide numerous algorithms for specific collective operations. The strategy for selecting an efficient algorithm is often times predefined (hard-coded) in MPI libraries, but some of them, such as Open MPI, allow users to change the algorithm manually. Finding the best algorithm for each case is a hard problem, and several approaches to tune these algorithmic parameters have been proposed. We use an orthogonal approach to the parameter-tuning of MPI collectives, that is, instead of testing individual algorithmic choices provided by an MPI library, we compare the latency of a specific MPI collective operation to the latency of semantically equivalent functions, which we call the mock-up implementations. The structure of the mock-up implementations is defined by self-consistent performance guidelines. The advantage of this approach is that tuning using mock-up implementations is always possible, whether or not an MPI library allows users to select a specific algorithm at run-time. We implement this concept in a library called PGMPITuneLib, which is layered between the user code and the actual MPI implementation. This library selects the best-performing algorithmic pattern of an MPI collective by intercepting MPI calls and redirecting them to our mock-up implementations. Experimental results show that PGMPITuneLib can significantly reduce the latency of MPI collectives, and also equally important, that it can help identifying the tuning potential of MPI libraries.
研究动机与目标
- 解决在传统参数调优不可行时优化 MPI 集体操作性能的挑战,原因包括缺乏暴露的参数或搜索空间过于复杂。
- 克服现有调优方法的局限性,这些方法依赖于库特定的、硬编码的算法选择策略。
- 提供一种可移植的、与库无关的方法,使用自洽性能准则检测并修正 MPI 库中的性能回归。
- 通过将低效实现与语义等价的优化模拟函数进行比较,实现对子最优 MPI 实现的自动识别。
- 证明即使在 Open MPI 等广泛使用的 MPI 库中,算法选择不可用户配置,性能改进依然可实现。
提出的方法
- 定义自洽性能准则,断言专用的 MPI 集体操作(如 MPI_Allgather)不应比其更通用的等价形式(如 MPI_Allgatherv)更慢。
- 将每个准则实现为模拟函数,使用更高效的算法模式模拟相应 MPI 集体操作的行为。
- 构建 PGMPITuneLib 作为运行时库,拦截 MPI 函数调用,并根据性能分析结果将调用重定向到性能最佳的模拟版本。
- 在运行时对每个模拟版本进行性能分析,以确定特定消息大小和进程数下的最快实现。
- 利用性能分析结果,在运行时动态将默认 MPI 实现替换为最优的模拟版本。
- 通过保持原始 MPI 函数与模拟实现之间的语义等价性,确保正确性。
实验结果
研究问题
- RQ1能否将性能准则作为可靠基线,用于检测 MPI 集体操作实现中的低效问题?
- RQ2基于性能准则的模拟实现能在多大程度上超越默认 MPI 库实现的性能?
- RQ3该方法是否可应用于任何 MPI 库,即使这些库未暴露算法调优参数?
- RQ4该方法在识别并修正真实世界 MPI 库(如 Open MPI)中的准则违反问题方面有多有效?
- RQ5在不同硬件平台上,使用此自动调优策略可实现多大的性能提升?
主要发现
- PGMPITuneLib 在所有测试系统中成功降低了 MPI 集体操作的延迟,包括具有复杂内存层次结构的系统。
- 该库识别并修正了 MPI 库(如 Open MPI)中的准则违反问题,其中默认实现的性能劣于语义等价的替代方案。
- 即使在无用户可调参数的库中,PGMPITuneLib 仍通过用优化模拟函数替换低效算法,实现了显著的性能提升。
- 该方法揭示了某些 MPI 库即使存在更优算法,仍使用次优算法,凸显了自动化调优的必要性。
- PGMPITuneLib 生成的性能配置文件可跨运行重复使用,实现一致且可复现的性能改进。
- 无论底层 MPI 库是否暴露算法配置选项,该方法均具有可移植性且效果显著。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。