PostgreSQL at low-level: stay curious!
summary
Shows concrete diagnostics and fixes: uses strace -k to find PostgreSQL 11 failing to allocate shared memory due to default shm limit (64MB) and to detect missing VDSO syscalls on older hypervisors, uses perf and BCC/ebpf scripts to measure a CPU-mitigation that adds ~25% overhead, to prove huge pages cut loads by ~90% and store misses by ~29%, and to reveal lock-holder preemption effects where toggling CPU post-exit features materially reduces latency; warns eBPF tooling can crash kernels.
AI-written summary · about
chapters (15)
- 0:00Introduction and background
- 3:11Why troubleshoot beyond PostgreSQL
- 4:56Case study shared memory errors
- 6:22Virtual system calls overhead
- 7:45Memory data sampling vulnerability
- 11:37Huge pages performance impact
- 13:24Lock holder preemption issue
- 16:33Introduction to BPF tools
- 18:43Scheduler wakeup granularity tuning
- 21:31CPU cache monitoring with BPF
- 22:56Dirty pages and I/O spikes
- 25:25Kubernetes memory limits confusion
- 27:33BPF setup and infrastructure
- 29:00Risks and pitfalls of BPF
- 30:25Conclusion and Q&A
