Skip to main content
QUICK REVIEW

[Paper Review] Measuring Software Performance on Linux

Martin Becker, Samarjit Chakraborty|arXiv (Cornell University)|Nov 4, 2018
Parallel Computing and Optimization TechniquesComputer Science12 references4 citations
TL;DR

This paper proposes a systematic measurement setup for accurately assessing software performance on Linux systems with modern x86 processors. By minimizing OS and hardware interference—especially through CPU frequency scaling, cgroups, and interrupt management—it reduces timing jitter and improves measurement reliability, particularly under background load, with performance degradation reduced from up to 64% in default setups to under 6% in the proposed configuration.

ABSTRACT

Measuring and analyzing the performance of software has reached a high complexity, caused by more advanced processor designs and the intricate interaction between user programs, the operating system, and the processor's microarchitecture. In this report, we summarize our experience about how performance characteristics of software should be measured when running on a Linux operating system and a modern processor. In particular, (1) We provide a general overview about hardware and operating system features that may have a significant impact on timing and how they interact, (2) we identify sources of errors that need to be controlled in order to obtain unbiased measurement results, and (3) we propose a measurement setup for Linux to minimize errors. Although not the focus of this report, we describe the measurement process using hardware performance counters, which can faithfully reflect the real bottlenecks on a given processor. Our experiments confirm that our measurement setup has a large impact on the results. More surprisingly, however, they also suggest that the setup can be negligible for certain analysis methods. Furthermore, we found that our setup maintains significantly better performance under background load conditions, which means it can be used to improve software in high-performance applications.

Motivation & Objective

  • Address the lack of standardized, reliable performance measurement practices for Linux-based systems.
  • Identify and mitigate sources of timing errors introduced by OS and microarchitectural features.
  • Propose a reproducible, low-jitter measurement setup to isolate software performance from system-level noise.
  • Demonstrate that the measurement setup significantly affects absolute performance metrics but has minimal impact on ratio-based analysis.
  • Improve stability and reliability of performance measurements under background load conditions.

Proposed method

  • Disable CPU frequency scaling (e.g., using 'performance' governor) to eliminate variable clock speeds.
  • Isolate the target process using cgroups to limit interference from other processes and interrupts.
  • Disable CPU idle states (C-states) and interrupt mitigation (e.g., local APIC timer, ftrace) to reduce timing jitter.
  • Use hardware performance counters via Linux's 'perf' tool to collect precise event counts (e.g., cache misses, branch mispredictions).
  • Apply hierarchical performance analysis with uncertainty propagation to quantify measurement error margins.
  • Conduct controlled experiments comparing default vs. optimized setups under varying background loads.

Experimental results

Research questions

  • RQ1How do OS-level features such as CPU frequency scaling, C-states, and interrupt handling affect software timing measurements on Linux?
  • RQ2What specific system configurations minimize measurement jitter and improve reproducibility in performance testing?
  • RQ3To what extent does the measurement setup influence absolute performance metrics versus ratio-based performance analysis?
  • RQ4How does background system load impact performance measurement stability, and can the proposed setup mitigate this?
  • RQ5Can a standardized measurement setup improve the reliability of performance data for high-performance applications?

Key findings

  • The proposed measurement setup reduced performance degradation from up to 64% in default configurations to less than 6% under background load.
  • For absolute event counts (e.g., cache misses), the proposed setup showed significant improvements, with stream performance degrading by only 2% compared to 67% in default setup.
  • The setup maintained stable performance under background load, demonstrating superior resilience compared to default configurations.
  • Surprisingly, for ratio-based performance analysis (e.g., speedup ratios), the measurement setup had minimal impact on results, suggesting robustness in relative comparisons.
  • Hardware performance counters (via 'perf') faithfully identified performance bottlenecks, but their accuracy depended heavily on the measurement setup.
  • The setup significantly reduced jitter and measurement uncertainty, especially when combined with cgroups and CPU isolation.

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.