Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward
Дата
Msg-id aEnxzX-aPY6nCEvH@nathan
обсуждение исходный текст
Ответ на [PATCH v1] parallel pg_restore: avoid disk seeks when jumping short distance forward  (Dimitrios Apostolou <jimis@gmx.net>)
Список pgsql-hackers
On Wed, Jun 11, 2025 at 12:32:58AM +0200, Dimitrios Apostolou wrote:
> Thank you for benchmarking! Before answering in more depth, I'm curious,
> what read-seek pattern do you see on the system call level (as shown by
> strace)? In pg_restore it was a constant loop of read(4K)-lseek(8-16K).

For fseeko(), sizes less than 4096 produce a repeating pattern of read()
calls followed by approximately (4096 / size) lseek() calls.  For greater
sizes, it's just a stream of lseek().  For fread(), sizes less than 4096
produce a stream of read(fd, "...", 4096), and for greater sizes, the only
difference is that the last argument is the size.

-- 
nathan



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