Skip to main content
QUICK REVIEW

[Paper Review] Multithreaded Input-Sensitive Profiling

Emilio Coppa, Camil Demetrescu|arXiv (Cornell University)|Apr 13, 2013
Parallel Computing and Optimization TechniquesComputer Science27 references3 citations
TL;DR

This paper extends input-sensitive profiling to multithreaded applications by introducing the threaded read memory size (trms) metric, which automatically estimates input size from memory accesses induced by other threads or system calls. The approach enables accurate performance characterization in concurrent programs using a Valgrind-based profiler with overhead comparable to heavyweight tools, while collecting significantly more performance points than prior methods.

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.

Motivation & Objective

  • To address the limitation of existing input-sensitive profilers that only handle sequential code and fail to account for thread-induced or external inputs in multithreaded applications.
  • To enable precise performance analysis of concurrent programs by automatically estimating the effective input size for each routine activation, even when input originates from non-deterministic thread communication or OS kernel operations.
  • To develop a practical, scalable profiler that integrates with existing dynamic instrumentation frameworks like Valgrind to support real-world multithreaded workloads.
  • To demonstrate that accurate input size estimation in concurrent settings leads to more informative and reliable cost function plots than previous approaches.

Proposed method

  • Introduces the threaded read memory size (trms) metric to quantify input size based on first-accesses to memory locations, including those modified by other threads or triggered by system calls.
  • Designs an efficient algorithm to track and compute trms for each routine activation by analyzing low-level memory access patterns during execution.
  • Implements a Valgrind-based profiler that instruments thread-unsafe memory operations and logs input size estimates per routine, preserving thread-level context.
  • Uses dynamic instrumentation to capture memory access traces and correlate them with routine activations, enabling automatic input size inference in concurrent execution.
  • Applies a cost function fitting technique to empirical data collected from multiple runs, enabling prediction of performance scaling across input sizes.
  • Validates the approach using synthetic examples and real-world case studies on MySQL and vips, demonstrating robustness to non-deterministic thread interactions.

Experimental results

Research questions

  • RQ1How can input size be accurately estimated in multithreaded programs where inputs are produced by other threads or system calls?
  • RQ2What metrics and instrumentation techniques are required to support input-sensitive profiling in concurrent environments without sacrificing performance or precision?
  • RQ3Can a Valgrind-based profiler achieve low overhead while collecting significantly more performance points than existing tools in multithreaded workloads?
  • RQ4How does the proposed trms metric improve the accuracy and reliability of performance cost function estimation compared to prior methods in concurrent applications?

Key findings

  • The proposed trms metric successfully captures input size from thread-induced and external sources, such as I/O or kernel operations, enabling accurate performance modeling in multithreaded programs.
  • The Valgrind-based profiler achieves overhead comparable to other heavyweight analysis tools, making it viable for real-world use despite dynamic instrumentation.
  • The profiler collects significantly more performance points per profiling session than previous approaches, improving the resolution and reliability of cost function estimation.
  • Case studies on MySQL and vips show that the extended profiler provides more precise characterization of performance behavior than prior input-sensitive profilers, especially in detecting bottlenecks caused by inter-thread communication.
  • The method correctly identifies and distinguishes between thread-induced input and external input, avoiding misleading performance plots that arise from incorrect input size estimation.
  • Experimental evaluation on SPEC OMP2012 and PARSEC benchmarks confirms the scalability and robustness of the approach across diverse multithreaded workloads.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.