PostgreSQL container groups, aka cgroups down the road
summary
Prototype integrates postgresql-cgroups branch with systemd cgroup v2 to create hierarchical groups (critical, workload, maintenance), uses systemd delegation and userland tools like CGTop screenshot to measure CPU, memory, IO and shows concrete gains: group-wide kill, NUMA binding via cpuset, and fast freeze/resume backends for connection throttling. It pairs cgroups with PSI and proposes eBPF hooks but currently needs root and kernel support; prototype works but shows misleading IO/memory accounting for workers until controllers are pushed to leaf groups and PostgreSQL switches from fork to clone and adds poll/PSI wait events.
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:35What are control groups
- 4:27Cgroup V1 vs V2 differences
- 9:52Why PostgreSQL should use Cgroup V2
- 10:12Custom Cgroup hierarchy for PostgreSQL
- 13:24Challenges with Cgroup integration
- 16:49Key rules and controllers in Cgroups
- 20:43Trade-offs of Cgroup accounting
- 22:29Setting up and managing Cgroups
- 23:32Potential PostgreSQL improvements
- 24:36Q&A and closing remarks
related talks
54mContainerized Clustered PostgreSQL
35mFuture-Proof Your Applications: Avoid Breakdowns With Cgroup Chan...
56mPostgreSQL at low Level: stay curious!
57mAn introduction to control groups (cgroups) version 2
38mPostgreSQL as a distributed computing platform
35mContainerizing PostgreSQL and Making it Cloud Native Ready
38mUnderstanding and Working with the Cgroups Interface
01h 02mDiving deeper into control groups (cgroups) v2
