Skip to main content
QUICK REVIEW

[论文解读] Multithreaded Input-Sensitive Profiling

Emilio Coppa, Camil Demetrescu|arXiv (Cornell University)|Apr 13, 2013
Parallel Computing and Optimization Techniques参考文献 27被引用 3
一句话总结

该论文通过引入线程读取内存大小(trms)度量,将输入敏感型性能分析扩展至多线程程序,该度量能自动从其他线程或系统调用引发的内存访问中估算输入大小。该方法在使用基于 Valgrind 的性能分析器时,实现了与重型工具相当的开销,同时显著收集了比以往方法更多的性能数据点,从而实现了对并发程序的精确性能表征。

ABSTRACT

Input-sensitive profiling is a recent performance analysis technique that makes it possible to estimate the empirical cost function of individual routines of a program, helping developers understand how performance scales to larger inputs and pinpoint asymptotic bottlenecks in the code. A current limitation of input-sensitive profilers is that they specifically target sequential computations, ignoring any communication between threads. In this paper we show how to overcome this limitation, extending the range of applicability of the original approach to multithreaded applications and to applications that operate on I/O streams. We develop new metrics for automatically estimating the size of the input given to each routine activation, addressing input produced by non-deterministic memory stores performed by other threads as well as by the OS kernel (e.g., in response to I/O or network operations). We provide real case studies, showing that our extension allows it to characterize the behavior of complex applications more precisely than previous approaches. An extensive experimental investigation on a variety of benchmark suites (including the SPEC OMP2012 and the PARSEC benchmarks) shows that our Valgrind-based input-sensitive profiler incurs an overhead comparable to other prominent heavyweight analysis tools, while collecting significantly more performance points from each profiling session and correctly characterizing both thread-induced and external input.

研究动机与目标

  • 解决现有输入敏感型性能分析器仅适用于顺序代码、无法有效处理多线程程序中由线程引发或外部来源输入的局限性。
  • 通过自动估算每个过程调用的输入有效大小,实现对并发程序的精确性能分析,即使输入源自非确定性的线程通信或操作系统内核操作。
  • 开发一种实用且可扩展的性能分析器,可与现有动态插桩框架(如 Valgrind)集成,以支持真实世界中的多线程工作负载。
  • 证明在并发环境中实现准确的输入大小估算,可生成比以往方法更具信息量和可靠性的性能代价函数图。

提出的方法

  • 提出线程读取内存大小(trms)度量,基于对内存位置的首次访问来量化输入大小,包括由其他线程修改或由系统调用触发的内存访问。
  • 设计一种高效算法,通过分析执行期间的底层内存访问模式,追踪并计算每个过程调用的 trms。
  • 实现一个基于 Valgrind 的性能分析器,对线程不安全的内存操作进行插桩,并记录每个过程的输入大小估算值,同时保留线程级别的上下文信息。
  • 使用动态插桩捕获内存访问轨迹,并将其与过程调用相关联,从而在并发执行中实现输入大小的自动推断。
  • 应用代价函数拟合技术,对多次运行中收集的实测数据进行处理,实现对不同输入规模下性能扩展特性的预测。
  • 通过合成示例和在 MySQL 与 vips 上的真实案例研究验证该方法,证明其对非确定性线程交互具有鲁棒性。

实验结果

研究问题

  • RQ1在输入由其他线程或系统调用产生的多线程程序中,如何准确估算输入大小?
  • RQ2在不牺牲性能或精度的前提下,支持并发环境中输入敏感型性能分析所需的度量和插桩技术是什么?
  • RQ3基于 Valgrind 的性能分析器是否能在多线程工作负载中实现低开销,同时显著多于现有工具收集的性能数据点?
  • RQ4与以往方法相比,所提出的 trms 度量在并发应用中如何提升性能代价函数估算的准确性和可靠性?

主要发现

  • 所提出的 trms 度量能有效捕捉来自线程引发和外部来源(如 I/O 或内核操作)的输入大小,从而在多线程程序中实现精确的性能建模。
  • 基于 Valgrind 的性能分析器实现了与其它重型分析工具相当的开销,尽管使用了动态插桩,但仍具备在真实场景中应用的可行性。
  • 该分析器在每次性能分析会话中收集的性能数据点显著多于以往方法,提升了代价函数估算的分辨率和可靠性。
  • 对 MySQL 和 vips 的案例研究显示,扩展后的分析器在性能行为表征上比以往的输入敏感型分析器更为精确,尤其在检测由线程间通信引发的性能瓶颈方面表现优异。
  • 该方法能正确识别并区分线程引发的输入与外部输入,避免了因输入大小估算错误而产生的误导性性能图表。
  • 在 SPEC OMP2012 和 PARSEC 基准测试上的实验评估证实,该方法在多样化的多线程工作负载中具备良好的可扩展性和鲁棒性。

更好的研究,从现在开始

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

无需绑定信用卡

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