Re: Handing off SLRU fsyncs to the checkpointer

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Handing off SLRU fsyncs to the checkpointer
Дата
Msg-id CA+hUKGKnTxRHj3zNixvnwn8Puu-o4mZ_bivP5xpH+0fCNSNwag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Handing off SLRU fsyncs to the checkpointer  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Handing off SLRU fsyncs to the checkpointer  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Sat, Aug 8, 2020 at 2:44 AM Robert Haas <robertmhaas@gmail.com> wrote:
> On Wed, Aug 5, 2020 at 2:01 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> > * Master is around 11% faster than last week before commit c5315f4f
> > "Cache smgrnblocks() results in recovery."
> > * This patch gives a similar speedup, bringing the total to around 25%
> > faster than last week (the time is ~20% less, the WAL processing speed
> > is ~1.25x).
>
> Dang, that's pretty nice, especially for the relatively small amount
> of code that it seems to require.

Yeah, the combined effect of these two patches is better than I
expected.  To be clear though, I was only measuring the time between
the "redo starts at ..." and "redo done at ..." messages, since I've
been staring at the main recovery code, but there are also some more
fsyncs before (SyncDataDirectory()) and after (RemoveOldXlogFiles())
that are unaffected.  I think it's probably possible to do something
about those too, but that's another topic.

I spotted a small problem: if the transaction ID wrap all the way
around between checkpoints, then you might have cancelled requests for
a removed SLRU segment from the previous epoch, so we'd better
uncancel them if we see that.  That's a one line fix, done in the
attached.  I also adjusted the commit message to be a little clearer
(this work deferment/collapsing scheme works in crash recovery too,
not just when there is a checkpointer process to hand the work to).

Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: 回复:how to create index concurrently on partitioned table
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: SyncRepLock acquired exclusively in default configuration