Re: Use fadvise in wal replay

Поиск
Список
Период
Сортировка
От Pavel Borisov
Тема Re: Use fadvise in wal replay
Дата
Msg-id CALT9ZEGorS9n88Ek1ZbLAPbPhbcM7CC4GZL4sk_MhAwRK=OP9w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use fadvise in wal replay  (Andrey Borodin <x4mmm@yandex-team.ru>)
Ответы Re: Use fadvise in wal replay  (Andrey Borodin <x4mmm@yandex-team.ru>)
Список pgsql-hackers
On Wed, Jun 22, 2022 at 2:07 PM Andrey Borodin <x4mmm@yandex-team.ru> wrote:


> On 21 Jun 2022, at 20:52, Pavel Borisov <pashkin.elfe@gmail.com> wrote:
>
> > On 21 Jun 2022, at 16:59, Jakub Wartak <jakub.wartak@tomtom.com> wrote:
> Oh, wow, your benchmarks show really impressive improvement.
>
> FWIW I was trying to speedup long sequential file reads in Postgres using fadvise hints. I've found no detectable improvements.
> Then I've written 1Mb - 1Gb sequential read test with both fadvise POSIX_FADV_WILLNEED and POSIX_FADV_SEQUENTIAL in Linux.
Did you drop caches?
Yes. I saw nothing changes speed of long file (50Mb+) read.
> The only improvement I've found was
>
> 1. when the size of read was around several Mb and fadvise len also around several Mb.
> 2. when before fdavice and the first read there was a delay (which was supposedly used by OS for reading into prefetch buffer)
That's the case of startup process: you read a xlog page, then redo records from this page.
Then I'd guess that your speedup is due to speeding up the first several Mb's in many files opened (and delay for kernel prefetch is due to some other reason). That may differ from the case I've tried to measure speedup and this could be the cause of speedup in your case.

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Add header support to text format and matching feature
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: Use fadvise in wal replay