Re: WAL prefetch

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: WAL prefetch
Дата
Msg-id d730e71b-fcb0-2cbd-04c9-1a341b172102@postgrespro.ru
обсуждение исходный текст
Ответ на Re: WAL prefetch  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: WAL prefetch  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers

On 14.06.2018 15:44, Robert Haas wrote:
> On Wed, Jun 13, 2018 at 11:45 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>> I have tested wal_prefetch at two powerful servers with 24 cores, 3Tb NVME
>>> RAID 10 storage device and 256Gb of RAM connected using InfiniBand.
>>> The speed of synchronous replication between two nodes is increased from 56k
>>> TPS to 60k TPS (on pgbench with scale 1000).
>> That's a reasonable improvement.
> Somehow I would have expected more.  That's only a 7% speedup.
>
> I am also surprised that HDD didn't show any improvement.

My be pgbench is not the best use case for prefetch. It is updating more 
or less random pages and if database is large enough and 
full_page_writes is true (default value)
then most pages will be updated only once since last checkpoint and most 
of updates will be represented in WAL by full page records.
And such records do not require reading any data from disk.

>   Since HDD's
> are bad at random I/O, I would have expected prefetching to help more
> in that case.
>
Speed of random HDD access is limited by speed of disk head movement.
By running several IO requests in parallel we just increase probability 
of head movement, so actually parallel access to HDD may even decrease 
IO speed rather than increase it.
In theory, given several concurrent IO requests, driver can execute them 
in optimal order, trying to minimize head movement. But if there are 
really access to random pages,
then probability that we can win something by such optimization is very 
small.


-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Следующее
От: Robert Haas
Дата:
Сообщение: Re: WAL prefetch