RE: Use fadvise in wal replay

Поиск
Список
Период
Сортировка
От Jakub Wartak
Тема RE: Use fadvise in wal replay
Дата
Msg-id AM8PR07MB82483DABE17210CBC3D872C9F6B39@AM8PR07MB8248.eurprd07.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Use fadvise in wal replay  (Andrey Borodin <x4mmm@yandex-team.ru>)
Ответы Re: Use fadvise in wal replay  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
> > Maybe the important question is why would be readahead mechanism be
> disabled in the first place via /sys | blockdev ?
>
> Because database should know better than OS which data needs to be
> prefetched and which should not. Big OS readahead affects index scan
> performance.

OK fair point, however the patch here is adding 1 syscall per XLOG_BLCKSZ which is not cheap either. The code is
alreadyhot and there is example from the past where syscalls were limiting the performance [1]. Maybe it could be
prefetchingin larger batches (128kB? 1MB? 16MB?)  ? 

-J.

[1] - https://commitfest.postgresql.org/28/2606/





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

Предыдущее
От: Andrey Borodin
Дата:
Сообщение: Re: Use fadvise in wal replay
Следующее
От: Peter Eisentraut
Дата:
Сообщение: gcc -ftabstop option