Skip to content
0:00 / 0:00

#benchmarking#profiling#coz

Plenary: Performance Matters - Emery Berger - CppCon 2020

CppCon

189K subscribers • 101 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 on Hacker News.
  • Presented by Emery Berger
  • Linked in the descriptionCppCon/CppCon2020

Advanced. Deep dive for people who know the field.

32K views6 years ago2 recommendations

Systems programmingTools and practicePerformance and optimizationC++Debugging

Emery Berger discusses the challenges of achieving predictable performance on modern hardware and introduces innovative profiling tools to find real bottlenecks.

cppcon.org/ github.com/CppCon/CppCon2020/blob/main/Presentations/perform… --- Performance is one of the chief reasons why many C++ programmers love the language. In the past, Moore's Law meant that our programs ran faster every year. Now that Dennard scaling has ended, C++ programmers have to work harder to get high performance for their applications. In this talk, I'll first discuss some of the significant and surprising challenges facing C++ programmers trying to achieve high performance on modern hardware platforms: performance is far less stable and predictable than you might think! I'll present some experimental evidence that strongly suggests we can't count on compiler optimizations to help us out of this hole: in particular, I'll show -- using a new experimental methodology -- that the difference between clang's -O2 and -O3 optimization levels is essentially indistinguishable from noise. Since compiler optimizations have run out of steam, we need better profiling support, especially for modern concurrent, multi-threaded applications. I'll talk about a new approach to profiling, which I call "causal profiling". Causal profiling lets programmers optimize for throughput or latency, and which pinpoints and accurately predicts the impact of optimizations. It works by running performance experiments, based on the idea of "virtual speedups". We've built a causal profiler called Coz, which now ships as part of standard Linux distros, and which also works for C++ and Rust (there's even a Java version). Using it, we find that Coz can unlock previously unknown optimization opportunities. Guided by Coz, we improved the performance of Memcached (9%), SQLite (25%), and accelerated six other 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!). --- 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, where he co-directs the PLASMA @ UMass lab. He graduated with a Ph.D. 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 improve reliability, security, and performance. He and his collaborators have created a number of influential software systems including Hoard, a fast and scalable memory manager that accelerates multithreaded applications (used by companies including British Telecom, Cisco, Crédit Suisse, Reuters, Royal Bank of Canada, SAP, and Tata, and on which the Mac OS X memory manager is based); DieHard, an error-

Why it's here

2 people recommend this

What people say. Recommended for its scientific approach to benchmarking and profiling, introducing tools that help identify actual performance bottlenecks rather than relying on guesswork.

jiggawattson Hacker News • Recommends

On “Beware of Tight Feedback Loops (2020)”

This guy has had a few talks at CppCon over the years, and covers the basics of how to attempt benchmarking with actual computer science instead of myth and voodoo rituals: link to this video In practice, it's not critical to go that far. In my experience, huge performance wins are trivial to benchmark with just a modicum of effort, and tiny performance wins are typically not worth any effort at all. At FAANG scale they might be, but I don't work at a FAANG, so not my problem! :) Simple methods I use and can recommend are: - Ideally, collect data from production, where the change behaves exactly as it would in production because it is production! - Interleave tests on the same machine. E.g.: A, B, A, B…

captaincrowbaron Hacker News • Recommends

On “Finding your home in game graphics programming”

The term you're looking for might be "abstraction penalty". For tools that can identify where the bottlenecks are, I recommend watching Emery Berger's talk "Performance Matters" from CppCon 2020 (either of the two links below should work). He introduces some innovative new profiling tools for this sort of analysis. link to this video link

vanderZwanon Hacker News • Mentions

On “Surprisingly Slow”

To give an oversimplified answer, that depends on how things are connected and synchronized. You know how bottlenecks are often explained using funnels in real life? Imagine two funnels, one directly connecting to another one. In that case, the effective rate of flow is determined by the funnel which has the smallest tip - the fact that the larger one lets through fluid quicker is irrelevant, as it is slowed down by the smaller one (we're obviously ignoring things like funnels potentially overflowing here, this is a simplified scenario). So then the bottleneck is easy to pin-point, but also it immediately becomes obvious that widening one funnel beyond the size of the other has no effect. No…