HackerPapers

arXiv:1608.03676cs.PF

Coz: Finding Code that Counts with Causal Profiling

Charlie Curtsinger, Emery D. Berger

Abstract

Improving performance is a central concern for software developers. To locate optimization opportunities, developers rely on software profilers. However, these profilers only report where programs spent their time: optimizing that code may have no impact on performance. Past profilers thus both waste developer time and make it difficult for them to uncover significant optimization opportunities. This paper introduces causal profiling. Unlike past profiling approaches, causal profiling indicates exactly where programmers should focus their optimization efforts, and quantifies their potential impact. Causal profiling works by running performance experiments during program execution. Each experiment calculates the impact of any potential optimization by virtually speeding up code: inserting pauses that slow down all other code running concurrently. The key insight is that this slowdown has the same relative effect as running that line faster, thus "virtually" speeding it up. We present Coz, a causal profiler, which we evaluate on a range of highly-tuned applications: Memcached, SQLite, and the PARSEC benchmark suite. Coz identifies previously unknown optimization opportunities that are both significant and targeted. Guided by Coz, we improve the performance of Memcached by 9%, SQLite by 25%, and accelerate six PARSEC applications by as much as 68%; in most cases, these optimizations involve modifying under 10 lines of code.

arXiv comments
Published at SOSP 2015 (Best Paper Award)
Journal reference
Proceedings of the 25th Symposium on Operating Systems Principles (SOSP '15), 2015, 184-197
DOI
doi:10.1145/2815400.2815409
Subjects
cs.PFPerformance

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 3 threads, from Feb 2020 to Jan 2025.

Comments linking this paper, per year.

Discussed in comments3 threads

    • If you enjoy the science of injecting slowness to determine which component has the largest impact on performance, you would enjoy this work by Emery Berger. Coz: Finding Code that Counts with Causal Profiling https://arxiv.org/abs/1608.03676 "Performance (Really) Matters" with…

      sitkackView on HNParent context

    • > deleting this one line of code can have a dramatic effect on seemingly unrelated performance micro-benchmarks. Some numbers get better (e.g. +5%), some numbers get worse (e.g. -10%). The same micro-benchmark can get faster on one C compiler but slower on another There's a…

      moonchildView on HNParent context

    • There's also something to be said for building better tooling in this area. Not everyone can achieve expertise in everything. Better tooling helps level the playing feel (& eventually outperform experts when the tooling becomes indispensable). You may think that's a cop-out, but…

      vlovich123View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.