What went wrong with AIO
summary
Five years of work produces a merged core AIO path landing in PG18 but not full write support yet; a prototype using io_uring and later worker mode survives, while a POSIX-thread backend proves unstable. Major mistakes: trying to share a few io_uring instances (started at eight) and preallocating IO handles that caused deadlocks; switching to per-backend descriptors and allowing one spare handle fixes forward progress. Scatter‑gather I/O and readstreams remove most CPU overhead; concurrent WAL writes give up to 4x–10x throughput but remain hard to tune with 64 IO handles defaults.
AI-written summary · about
chapters (11)
- 0:00Introduction and project timeline
- 3:30Architectural challenges in AIO
- 11:44Prototype development and performance issues
- 16:20Major design mistakes in AIO
- 21:45Locking and IO handle management problems
- 26:23Prototype limitations and lessons learned
- 31:41Testing infrastructure and CI integration
- 35:13External challenges and project delays
- 38:05Current state of AIO in PostgreSQL 18
- 41:16Future improvements and optimizations
- 47:03Q&A and acknowledgments
related talks
48mThe path to using AIO in postgres
49mAIO in PG 18 and beyond
01h 06mIO in PostgreSQL: Past, Present, Future
41mLinux IO internals for PostgreSQL administrators in 2023
49mStreaming I/O and vectored I/O
48mStreaming I/O and vectored I/O
30mDeveloping IO Prefetching for Postgres
16mPAIO: General, Portable I/O Optimizations With Minor Application Modifications
