Extracting Clean Performance Models from Tainted Programs

Marcin Copik, Alexandru Calotoiu, Tobias Grosser, Nicolas Wicki, Felix Wolf, Torsten Hoefler · DOI

Performance models are essential for understanding the scaling behavior of parallel applications, expressing how metrics like execution time change as parameters—such as process count or input size—vary. While empirical performance modeling can derive these models from data, it faces significant hurdles: expensive measurements, noise-induced inaccuracies, and complex experiment design.

The Perf-Taint framework introduces a "white-box" approach to this problem by borrowing taint analysis from computer security. By tracking how input parameters flow through a program's logic, Perf-Taint reduces modeling costs, improves model quality, and helps validate experimental setups.

The Perf-Taint framework addresses the trade-offs between cost, quality, and validity in performance modeling.

The Challenges of Black-Box Modeling

Traditional empirical modeling treats applications as "black boxes." Researchers run programs multiple times with varying parameters and use regression to find a matching mathematical function. This approach hits three major walls:

  1. The Curse of Dimensionality: Adding parameters causes the number of required experiments to explode exponentially.
  2. Noise and Overfitting: System noise (e.g., network congestion) can be mistaken for real performance trends, leading to overly complex models for simple functions.
  3. Instrumentation Overhead: Measuring every function can slow programs down by 10x–100x, distorting the very performance being measured.

Methods: A White-Box Approach

Perf-Taint integrates dynamic taint analysis into the modeling pipeline to provide the insight black-box tools lack.

  • Taint Analysis: Input variables (like problem size) are marked as "tainted." As the program executes, the taint spreads to any derived variables.
  • Loop-Centric Sinks: The tool monitors "sinks"—code locations where tainted data influences control flow, such as loop exit conditions. If a loop's trip count depends on a tainted parameter, that parameter is logically linked to that code block's performance.
  • Hybrid Modeling: Perf-Taint combines this dependency information with Extra-P, a standard modeling tool. Knowing which parameters affect which functions allows the system to prune the search space and identify constant functions that don't need expensive instrumentation.
Comparison of the traditional black-box modeling workflow (Extra-P) versus the white-box approach enabled by Perf-Taint.

Key Insights

  • Taint as a "Virtual Expert": Perf-Taint automates the mapping of program internals, a task that usually requires a human expert to manually specify which parameters matter for which functions.
  • Separating Logic from Hardware Noise: If a model shows a dependency that taint analysis proves is logically impossible, the fluctuation must be due to hardware interference (e.g., memory contention). This allows developers to distinguish between algorithmic scaling and environmental noise.
  • Selective Instrumentation: By identifying functions unaffected by parameters early, the tool can skip instrumenting them, drastically reducing the performance "tax" of measurement.

Evaluation and Results

The authors evaluated Perf-Taint using the LULESH hydrodynamics benchmark and the MILC lattice QCD application on the Piz Daint supercomputer and a local Skylake cluster.

  • Massive Cost Savings: For LULESH, Perf-Taint reduced computational costs from 20,483 core-hours to just 547 core-hours—a 97.3% reduction.
  • Reduced Overhead: Removing unnecessary instrumentation for constant functions in LULESH sped up measured execution by up to 45x.
  • Improved Accuracy: In MILC, the tool correctly identified MPI functions as constant, whereas previous black-box models had incorrectly attributed noise to parameter dependencies.
  • Validation: The tool successfully detected hardware contention in LULESH by spotting performance changes in code blocks logically independent of the process count.

Limitations

While powerful, Perf-Taint currently has some limitations. The loop-based analysis does not explicitly support recursion (though rare in HPC kernels), and users must still manually "register" input parameters with a single line of code. Additionally, as a dynamic analysis tool, it only observes executed code paths; dependencies in unexecuted branches may be missed. Future work aims to extend this tracking across MPI messages for full network tainting.

Summary updated

BibTeX
@inproceedings{copik2020extracting,
  author = {Marcin Copik and Alexandru Calotoiu and Tobias Grosser and Nicolas Wicki and Felix Wolf and Torsten Hoefler},
  title = {{Extracting Clean Performance Models from Tainted Programs}},
  booktitle = {PPoPP},
  year = {2020},
  doi = {10.1145/3437801.3441613},
}
Figure