Re: Should io_method=worker remain the default?
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-09-08T21:02:43Z
Lists: pgsql-hackers
Hi, On 2025-09-08 16:45:52 -0400, Andres Freund wrote: > On 2025-09-08 12:08:10 -0700, Jeff Davis wrote: > > On Mon, 2025-09-08 at 14:39 +1200, Thomas Munro wrote: > > > Some raw thoughts on this topic, and how we got here: This type of > > > extreme workload, namely not doing any physical I/O, just copying the > > > same data from the kernel page cache to the buffer pool over and over > > > again, > > > > Isn't that one of the major selling points of AIO? It does "real > > readahead" from kernel buffers into PG buffers ahead of the time, so > > that the backend doesn't have to do the memcpy and checksum > > calculation. > > I don't think accelerating copying from the pagecache into postgres shared > buffers really is a goal of AIO. I forgot an addendum: In fact, if there were a sufficiently cheap way to avoid using AIO when data is in the page cache, I'm fairly sure we'd want to use that. However, there is not, from what I know (both fincore() and RWF_NOWAIT are too expensive). The maximum gain from using AIO when the data is already in the page cache is just not very big, and it can cause slowdowns due to IPC overhead etc. Greetings, Andres Freund
Commits
-
meson: Build numeric.c with -ftree-vectorize.
- 9016fa7e3bcd 19 (unreleased) landed
- 87ea6e9b66b6 18.0 landed
- 509c779293f2 16.11 landed
- 15f9eeef624f 17.7 landed
-
meson: build checksums with extra optimization flags.
- 2de24ca6ca51 16.11 landed
- e25453a3631f 17.7 landed
- a7024398b80a 18.0 landed
- 9af672bcb245 19 (unreleased) landed