Re: Improve configurability for IO related behavoir

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: 浩辰 何 <hehaochen(at)hotmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve configurability for IO related behavoir
Date: 2022-05-28 20:33:46
Message-ID: CA+hUKG+yABbrk64UnUBC9k=tpKyL0ERf=ZqeAivhRhCGM_EbUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, May 29, 2022 at 4:29 AM 浩辰 何 <hehaochen(at)hotmail(dot)com> wrote:
> Furthermore, the results above are also related to IO API supported by OS. MySQL support synchronized IO and Linux libaio. It seems
> that PostgreSQL only supports synchronized IO, so shall we support more IO engines? like io_uring which is very popular in recent years.

Hi Haochen,

There is an active project to bring these things to PostgreSQL.
https://wiki.postgresql.org/wiki/AIO has some information and links.
The short version is that there is a development patch set to add
these GUCs:

io_method=worker,io_uring,posix_aio,iocp,...
io_data_direct=on,off
io_wal_direct=on,off

It also adds a bunch of specialised logic that knows how to initiate
IO in key places (scans, writeback, recovery, ...), because it's not
enough to just turn off kernel I/O buffering, we also have to do all
the work the kernel is doing for us or performance will be terrible.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shaheed Haque 2022-05-28 20:48:57 Re: JSONB index not in use, but is TOAST the real cause of slow query?
Previous Message Tom Lane 2022-05-28 19:59:12 Re: JSONB index not in use, but is TOAST the real cause of slow query?