Selective asynchronous commits in PostgreSQL - balancing durability and performance

Selective asynchronous commits in PostgreSQL - balancing durability and performance 图片 1

I was recently looking into some workloads that generate a lot of I/O and CPU contention on some very high-write code paths and came across synchronous_commit (postgresql.org/docs/current/wal-async-commit.html). It can be very tempting to turn this off globally because the performance gains in terms of I/O, CPU, and TPS (transactions per second) are very hard to overlook. I noticed I/O completely gone, CPU down 20% (at peak), and a 30% increase in TPS.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论