Re: [HACKERS] subscription worker signalling wal writer too much

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: [HACKERS] subscription worker signalling wal writer too much
Дата
Msg-id CAMkU=1yz3RYqPta7kzv0dyPQNaGoutkYKmTWBLFKpsPc1DO9nQ@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] subscription worker signalling wal writer too much  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: [HACKERS] subscription worker signalling wal writer too much  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Wed, Jun 14, 2017 at 11:55 AM, Jeff Janes <jeff.janes@gmail.com> wrote:
If I publish a pgbench workload and subscribe to it, the subscription worker is signalling the wal writer thousands of times a second, once for every async commit.  This has a noticeable performance cost.

I've used a local variable to avoid waking up the wal writer more than once for the same page boundary.  This reduces the number of wake-ups by about 7/8.

I'm testing it by doing 1e6 transactions over 8 clients while replication is in effect, then waiting for the logical replica to catch up.  This cycle takes 183.1 seconds in HEAD, and 162.4 seconds with the attached patch. N=14, p-value for difference of the means 6e-17.

If I suppress all wake-ups just to see what would happen, it further reduces the runtime to 153.7.

Cheers,

Jeff
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] intermittent failures in Cygwin from select_parallel tests
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] subscription worker signalling wal writer too much