From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | Jakub Wartak <jakub(dot)wartak(at)tomtom(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Kirill Reshke <reshke(at)double(dot)cloud>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Use fadvise in wal replay |
Date: | 2022-06-21 17:24:21 |
Message-ID: | F06FB8F4-CDBC-4407-8248-36685212BB1F@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 21 Jun 2022, at 16:59, Jakub Wartak <jakub(dot)wartak(at)tomtom(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Borisov | 2022-06-21 17:52:56 | Re: Use fadvise in wal replay |
Previous Message | Tom Lane | 2022-06-21 16:33:31 | Re: fix crash with Python 3.11 |