skip to main content
article

Fine-Grained Hardware Profiling - Are You Using the Right Tools?

Published: 31 July 2024 Publication History

Abstract

We consider the problem of fine-grained hardware profiling, i.e., profiling the hardware while the desired section of the program is executing. Although this requirement is frequently encountered in practice, its importance has not been emphasized in literature so far. In this work, we compare and validate three tools for performing fine-grained profiling on Linux platforms - perf, PAPI, and a homegrown tool PMU-metrics. perf has been used in the past for fine-grained profiling in an erroneous manner, producing inaccurate metrics as a result. On the other hand, PAPI and PMU-metrics produce accurate metrics for profiling at thems-scale, while PMUmetrics enables profiling even at the µs-scale. Thus, we hope that our analysis will help systems practitioners choose the right tool for performing fine-grained profiling at different time scales.

References

[1]
BLARE codebase. github.com/mush-zhang/ Blare/tree/main/original_codebase.
[2]
clock gettime(3) -- Linux manual page. https://tinyurl.com/yyvkc2wz.
[3]
Counting CPU cycles with perf event in C. https://tinyurl.com/46azwvn6.
[4]
perf event source code. https://tinyurl.com/2bc557nj.
[5]
perf event open(2) -- Linux manual page. https://tinyurl.com/29f64vsm.
[6]
RDPMC -- Read Performance-Monitoring Counters. https://tinyurl.com/6rc495ud.
[7]
US Accidents dataset (2016--2019). https://tinyurl.com/2n4rv5cd.
[8]
Use Linux's high resolution clock -- clock gettime. https://tinyurl.com/3emmhdm5.
[9]
WRMSR -- Write to Model Specific Register. https://tinyurl.com/nfund4fe.
[10]
The PMU-metrics Library. https: //github.com/UWHustle/pmu-metrics, 2022.
[11]
A. C. De Melo. The New Linux perf tools. In Slides from Linux Kongress, volume 18, 2010.
[12]
A. Kakaraparthy, J. M. Patel, B. P. Kroth, and K. Park. VIP Hashing -- Adapting to Skew in Popularity of Data on the Fly (extended version). arXiv, 2022.
[13]
T. Kersten, V. Leis, A. Kemper, T. Neumann, A. Pavlo, and P. Boncz. Everything You Always Wanted to Know about Compiled and Vectorized Queries but Were Afraid to Ask. Proc. VLDB Endow., 11(13), 2019.
[14]
T. M¨uhlbauer, W. R¨odiger, R. Seilbeck, A. Reiser, A. Kemper, and T. Neumann. Instant Loading for Main Memory Databases. Proc. VLDB Endow., 6(14), 2013.
[15]
D. Terpstra, H. Jagode, H. You, and J. Dongarra. Collecting Performance Data with PAPI-C. In Tools for High Performance Computing 2009. Springer Berlin Heidelberg.
[16]
L. Zhang, S. Deep, A. Floratou, A. Gruenheid, J. M. Patel, and Y. Zhu. Exploiting Structure in Regular Expression Queries. Proc. ACM Manag. Data, 1(2), June 2023.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGMOD Record
ACM SIGMOD Record  Volume 53, Issue 2
June 2024
69 pages
DOI:10.1145/3685980
Issue’s Table of Contents
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 31 July 2024
Published in SIGMOD Volume 53, Issue 2

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 61
    Total Downloads
  • Downloads (Last 12 months)61
  • Downloads (Last 6 weeks)10
Reflects downloads up to 01 Mar 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media