> On Tue, Feb 23, 2021 at 02:03:44AM -0800, Andres Freund wrote: > > over the last ~year I spent a lot of time trying to figure out how we could > add AIO (asynchronous IO) and DIO (direct IO) support to postgres. While > there's still a *lot* of open questions, I think I now have a decent handle on > most of the bigger architectural questions. Thus this long email. > > Just to be clear: I don't expect the current to design to survive as-is. If > there's a few sentences below that sound a bit like describing the new world, > that's because they're from the README.md in the patch series...
Thanks! > Comments? Questions? > > I plan to send separate emails about smaller chunks of this seperately - > the whole topic is just too big. In particular I plan to send something > around buffer locking / state management - it's a one of the core issues > around this imo. I'm curious about control knobs for this feature, it's somewhat related to the stats questions also discussed in this thread. I guess most important of those are max_aio_in_flight, io_max_concurrency etc, and they're going to be a hard limits, right? I'm curious if it makes sense to explore possibility to have these sort of "backpressure", e.g. if number of inflight requests is too large calculate inflight_limit a bit lower than possible (to avoid hard performance deterioration when the db is trying to do too much IO, and rather do it smooth). From what I remember io_uring does have something similar only for SQPOLL. Another similar question if this could be used for throttling of some overloaded workers in case of misconfigured clients or such?