Re: Should io_method=worker remain the default?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should io_method=worker remain the default?
Date: 2025-09-08 21:02:43
Message-ID: 3oyfupjn74vwwheaccsq4ooqunf77jfax5wsem75r653dqjufo@c4cevawnsahq
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-09-08 21:08:16 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Andres Freund 2025-09-08 20:45:52 Re: Should io_method=worker remain the default?