Schedule - PostgreSQL Development Conference 2024
Analyzing cacheline contention using perf c2c
Date: 2024-05-29
Time: 13:30–14:20
Room: Canfor(1600)
Level: Advanced
A substantial number of scalability issues in postgres are caused by contention on CPU cachelines. Once a problematic area of memory is known, it often isn't too hard to fix, e.g. by reducing sharing, improving locality of access or duplicating data. What is harder, is to identify contended cachelines.
In this talk I'll provide a brief introduction into cache coherency, how to find contended cachelines using perf c2c, and how to address some identified problems.
The motivation for giving this talk is that I utilized perf c2c to find significant scalability issues in the past, leading to e.g. the snapshot scalability improvements in PG 14. I've repeatedly been asked how I was able to identify these problems, but just pointing to perf c2c did not suffice as an explanation - it's not an immediately intuitive tool.
Talk recorded at https://youtu.be/dLrqQOCRFOU.
Slides
The following slides have been made available for this session: