Skip to content
0:00 / 0:00

#coz#causalprofiling#benchmarking

"Performance (Really) Matters" with Emery Berger

Association for Computing Machinery (ACM)

49K subscribers • 7 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • A classic. People kept recommending it from 2022 to 2026.
  • Presented by Emery Berger, Professor at UMASS Amherst
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

7.1K views6 years ago3 recommendations

Systems programmingTools and practicePerformance and optimizationCompilers and interpretersTesting

Emery Berger explains why traditional performance profiling fails on modern hardware and introduces causal profiling to find code that actually matters.

Title: Performance (Really) Matters Speaker: Emery Berger Date: September 23, 2020 ABSTRACT Performance clearly matters to users. For example, the most common software update on the AppStore is "Bug fixes and performance enhancements." Now that Moore's Law has ended, programmers have to work hard to get high performance for their applications. But why is performance hard to deliver? I will first explain why current approaches to evaluating and optimizing performance don't work. I'll show how complicated performance has become on modern systems, and how compiler optimizations have essentially run out of steam. Next, I'll introduce two radically new performance profilers that guide programmers directly to the code they need to change to improve application performance. The first is Coz, a new "causal profiler" for C/C++/Rust (with a Java version as well) that lets programmers optimize for throughput or latency, and which pinpoints and accurately predicts the impact of optimizations via what we call "virtual speedup" experiments. Coz's approach unlocks previously unknown optimization opportunities. Guided by Coz, we improved the performance of applications by as much as 68%; in most cases, this involved modifying less than 10 lines of code and took under half an hour (without any prior understanding of the programs!). Coz now ships as part of standard Linux distros (apt install coz-profiler). The second is Scalene, a "scripting-language aware" profiler for Python (with other scripting languages to come). Scalene runs orders of magnitude faster than other profilers while delivering far more detailed information -- information that's especially valuable to Python programmers. Via a combination of sampling, inference, and disassembly of byte-codes, Scalene efficiently and precisely attributes execution time and memory usage to Python, which developers can optimize, or library code, which they cannot. Its novel sampling memory allocator efficiently reports line-level memory consumption and trends with low overhead, helping developers reduce footprints and identify leaks. Finally, Scalene reports a new metric, copy volume, that helps developers root out insidious copying costs across the Python/library boundary, which can drastically degrade performance. Scalene is available on PyPi (pip install scalene). SPEAKER Emery Berger Professor, University of Massachusetts Amherst, ACM Fellow Emery Berger is a Professor in the College of Information and Computer Sciences at the University of Massachusetts Amherst, the flagship campus of the UMass system. He graduated with a PhD in Computer Science from the University of Texas at Austin in 2002. Professor Berger has been a Visiting Scientist at Microsoft Research and at the Universitat Politècnica de Catalunya (UPC)/Barcelona Supercomputing Center (BSC). Professor Berger’s research spans programming languages, runtime systems, and operating systems, with a particular focus on systems that transparently improv

Why it's here

3 people recommend this

What people say. Highly recommended for exposing the flaws of traditional benchmarking and introducing causal profiling.

Moments people linked to

reitzensteinmon Hacker News • Recommends

On “When Optimising Code, Measure”

If you're measuring performance and haven't seen this talk by Emery Berger, I highly recommend it. It's mind blowing, but also terrifying when you realize how many mistakes you've been making up until this point. link to this video

vanderZwanon Hacker News • Recommends

On “Fast memcpy, A System Design”

> The main trap is trying to benchmark and profile it without the context of the whole application. Emery Berger's "Performance (Really) Matters" talk also goes into this0. He paints a really, really depressing picture of how unreliable benchmarks truly are. Like, things like link order having ridiculous impacts and stuff like that. 0 link to this video

sitkackon Hacker News • Recommends

On “Disabling Zen 5's Op Cache and Exploring Its Clustered Decoder”

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 link "Performance (Really) Matters" with Emery Berger link to this video

vanderZwanon Hacker News • Recommends

On “To study how chips work, MIT researchers built their own operating system”

I think you're better off watching any of the various recordings "Performance Matters" conference talks0 by Emery Berger to learn about all the ways that developers are benchmarking the wrong thing using the wrong techniques, and what you could do instead 0 link to this video

kaliszadon Hacker News • Mentions

On ““Fast Kernel Headers” Tree -v1: Eliminate the Linux Kernel's “Dependency Hell””

…mfort, speed and maintenance is way more burdensome than what it could be. Here, you would need to involve a compiler of course and do more due diligence and then run ftrace or something to exchange the code. Also, you would probably in some cases need to make sure, the ordering of code is right as to not hurt performance. (See Emery Berger's talk link to this video which probably applies here as well.) Of course, with great power comes great responsibility. You could add some optional checking facility, that would be able to roll back the changes to code if some conditions were met.…

sitkackon Hacker News • Mentions

On “The true cost of linked lists”

It isn't CS 101. You are being overly dismissive and even CS people from top schools get this stuff wrong. The courses that introduce big-O are often the weeder courses, they don't aim to education, they aim to flunk out the people that might be hard to teach so that CS departments can gate keep. When you have top CS researchers having to give talks to remind people that layout matters more than instruction selection, the CS as a whole has focused on the wrong things. link to this video Figure how to build people up, not tear them down.

nerpderp82on Hacker News • Mentions

On “Four Kinds of Optimisation”

Performance (Really) Matters by Emery Berger talks a lot about layout. link to this video And the topic of Coordinated Omission, "How NOT to Measure Latency" by Gil Tene link Injection slowness into an application to measure the relative impact of that portion of the application has really worked well for me.

u/fullouterjoinin r/ProgrammingLanguages • Mentions

On “Distilling the Real Cost of Production Garbage Collectors”

I agree that trying to compare a GC implementation with C or C++ is very difficult and makes good science nearly impossible. But comparing Java code with a null collector can do good science. The collector gives you the abstraction of infinite memory, like the null collector while reducing the total memory consumption, but the application isn't aware of the reclamation. The JVM collector under test exchanges some resource for using less memory. Could be cores, memory bandwidth, energy, etc. Relative resource efficiency between the collector under test and the Epsilon collector would give a useful metric wouldn't it? I think huge performance variability due to layout differences is kinda a…
2View on Reddit