skip to main content
research-article
Public Access

Coz: finding code that counts with causal profiling

Published:23 May 2018Publication History
Skip Abstract Section

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 spend 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 such as 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.

References

  1. Altman, E.R., Arnold, M., Fink, S., Mitchell, N. Performance analysis of idle programs. OOPSLA. ACM (2010), 739--753. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Curtsinger, C., Berger, E.D. Stabilizer: Statistically sound performance evaluation. In ASPLOS (New York, NY, USA, 2013), ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Curtsinger, C., Berger, E.D. Coz: Finding code that counts with causal profiling. In SOSP, (ACM, New York, NY, 2015), 184--197. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. David, F., Thomas, G., Lawall, J., Muller, G. Continuously measuring critical section pressure with the free-lunch profiler. In OOPSLA, (ACM, New York, NY, 2014), 291--307. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Free Software Foundation. Debugging with GDB, 10th edn., The Free Software Foundation, Boston, MA.Google ScholarGoogle Scholar
  6. Garcia, S., Jeon, D., Louie, C.M., Taylor, M.B. Kremlin: rethinking and rebooting gprof for the multicore age. In PLDI, (ACM, New York, NY, 2011), 458--469. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Graham, S.L., Kessler, P.B., McKusick, M.K. Gprof: A call graph execution profiler. In SIGPLAN Symposium on Compiler Construction, (ACM, New York, NY, 1982), 120--126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Intel. Intel VTune Amplifier, 2015.Google ScholarGoogle Scholar
  9. kernel.org. perf: Linux profiling with performance counters, 2014.Google ScholarGoogle Scholar
  10. Kulkarni, M., Pai, V.S., Schuff, D.L. Towards architecture independent metrics for multicore performance analysis. SIGMETRICS Performance Evaluation Review 38, 3 (2010), 10--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Levon, J., Elie, P. Oprofile: A system profiler for Linux, 2004. http://oprofile.sourceforge.net/.Google ScholarGoogle Scholar
  12. Little, J.D. OR FORUM: Little's Law as Viewed on Its 50th Anniversary. Operations Research 59, 3 (2011), 536--549. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Miller, B.P., Yang, C.-Q. IPS: An interactive and automatic performance measurement tool for parallel and distributed programs. In ICDCS, 1987, 482--489.Google ScholarGoogle Scholar
  14. Mytkowicz, T., Diwan, A., Hauswirth, M., Sweeney, P.F. Evaluating the accuracy of Java profilers. In PLDI (2010) ACM, 187--197. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Snelick, R., JáJá, J., Kacker, R., Lyon, G. Synthetic-perturbation techniques for screening shared memory programs. Software Practice & Experience 24, 8 (1994), 679--701. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. von Praun, C., Bordawekar, R., Cascaval, C. Modeling optimistic concurrency using quantitative dependence analysis. In PPoPP (2008), ACM, 185--196. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Zhang, X., Navabi, A., Jagannathan, S. Alchemist: A transparent dependence distance profiling infrastructure. In CGO (2009), IEEE Computer Society, 47--58. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Coz: finding code that counts with causal profiling

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image Communications of the ACM
            Communications of the ACM  Volume 61, Issue 6
            June 2018
            97 pages
            ISSN:0001-0782
            EISSN:1557-7317
            DOI:10.1145/3229066
            Issue’s Table of Contents

            Copyright © 2018 ACM

            Permission to make digital or hard copies of all or part 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 components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 23 May 2018

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader

          HTML Format

          View this article in HTML Format .

          View HTML Format