~/talk

Analyzing cacheline contention using perf c2c

Talkat PGConf.dev 2024 · 2024-05-28..05-31· [databases, linux-and-operating-systems]
slides:none on file

Demonstrates using perf c2c to locate true cacheline contention in Postgres and traces how that led to snapshot scalability work in PG 14. Covers cache hierarchy, coherence protocol behavior, and how HitM events reveal modified-line transfers across cores/sockets. Shows a concrete case: buffer descriptor false sharing around lock/state fields, and a five-line padding change (separating lock from read-mostly fields) raises pgbench throughput from ~7,500 to ~10,000 tx/s at 16 clients. Describes recording and reporting tips and using buffer descriptor padding as a practical fix.

AI-written summary · about

  1. 0:00Introduction to cacheline contention
  2. 1:13Hardware cache structure basics
  3. 8:46What is cacheline contention
  4. 13:20False sharing scenarios explained
  5. 16:51Solutions to cacheline issues
  6. 18:57What is perf c2c
  7. 23:37Analyzing with perf c2c report
  8. 34:09Case study: buffer descriptor fix
  9. 40:11Caveats and performance impact
  10. 41:59Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.