Re: Use fadvise in wal replay - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Use fadvise in wal replay
Date
Msg-id CAAhFRxjrvYktJ6bu9_SqDv5w=s7-7pitwhgcORuGMQ-zKpGysQ@mail.gmail.com
Whole thread Raw
In response to Re: Use fadvise in wal replay  (Pavel Borisov <pashkin.elfe@gmail.com>)
Responses Re: Use fadvise in wal replay
List pgsql-hackers
On Fri, Nov 25, 2022 at 1:12 PM Pavel Borisov <pashkin.elfe@gmail.com> wrote:
>
> As I've written up in the thread we can not gain much from this
> optimization. The results of Jakub shows around 2% difference:
>
> >baseline, master, default Linux readahead (128kb):
> >33.979, 0.478
> >35.137, 0.504
> >34.649, 0.518>
>
> >master+patched, readahead disabled:
> >34.338, 0.528
> >34.568, 0.575
> >34.007, 1.136
>
> >master+patched, readahead enabled (as default):
> >33.935, 0.523
> >34.109, 0.501
> >33.408, 0.557
>

The performance benefit shows up only when readahead is disabled. And
on many workloads readahead brings unneeded data into page cache, so
it's preferred configuration.
In this particular case, time to apply WAL decreases from 53s to 33s.

Thanks!

Best Regards, Andrey Borodin.



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: pglz compression performance, take two
Next
From: Andrey Borodin
Date:
Subject: Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication