Re: Use fadvise in wal replay - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Use fadvise in wal replay
Date
Msg-id F06FB8F4-CDBC-4407-8248-36685212BB1F@yandex-team.ru
Whole thread Raw
In response to RE: Use fadvise in wal replay  (Jakub Wartak <Jakub.Wartak@tomtom.com>)
Responses Re: Use fadvise in wal replay
RE: Use fadvise in wal replay
List pgsql-hackers

> On 21 Jun 2022, at 16:59, Jakub Wartak <jakub.wartak@tomtom.com> wrote:
Oh, wow, your benchmarks show really impressive improvement.

> I think that 1 additional syscall is not going to be cheap just for non-standard OS configurations
Also we can reduce number of syscalls by something like

#if defined(USE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
    if ((readOff % (8 * XLOG_BLCKSZ)) == 0)
        posix_fadvise(readFile, readOff + XLOG_BLCKSZ, XLOG_BLCKSZ * 8, POSIX_FADV_WILLNEED);
#endif

and maybe define\reuse the some GUC to control number of prefetched pages at once.

Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: fix crash with Python 3.11
Next
From: Pavel Borisov
Date:
Subject: Re: Use fadvise in wal replay