Re: BAS_BULKREAD vs read stream

Поиск
Список
Период
Сортировка
От Jakub Wartak
Тема Re: BAS_BULKREAD vs read stream
Дата
Msg-id CAKZiRmwQchMK_97KcqSQob0aCax1kCLXE9n3vio_SR5nQBq-+A@mail.gmail.com
обсуждение исходный текст
Ответ на BAS_BULKREAD vs read stream  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sun, Apr 6, 2025 at 10:15 PM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
[..]
> The obvious solution to that would be to increase BAS_BULKREAD substantially
> above 256kB.
>
> For quite a while was worried about increasing the size, because somewhere (I
> couldn't find it while writing this email, will add the reference once I
> refound it) we have a comment explaining that a small size was chosen because
> it helps with CPU cache efficiency.

Hi, FWIW, I was trying to understand the scope of this change and
GetAccessStrategy() actually asks to go to
src/backend/storage/buffer/README which explains the logic behind the
old (pre-commit now) rationale and value. It says
```
For sequential scans, a 256KB ring is used. That's small enough to fit in L2
cache, which makes transferring pages from OS cache to shared buffer cache
efficient.
```

-J.



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