Re: Handing off SLRU fsyncs to the checkpointer

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Jakub Wartak <Jakub(dot)Wartak(at)tomtom(dot)com>
Cc: "alvherre(at)2ndquadrant(dot)com" <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Handing off SLRU fsyncs to the checkpointer
Date: 2020-08-28 05:45:41
Message-ID: CA+hUKG+YuMHnyYg9qqAUBY2fajqvuCChTWLtVeU=Lhfnb20WRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 27, 2020 at 8:48 PM Jakub Wartak <Jakub(dot)Wartak(at)tomtom(dot)com> wrote:
> >> 29.62% postgres [kernel.kallsyms] [k] copy_user_enhanced_fast_string
> >> ---copy_user_enhanced_fast_string
> >> |--17.98%--copyin
> >> [..]
> >> | __pwrite_nocancel
> >> | FileWrite
> >> | mdwrite
> >> | FlushBuffer
> >> | ReadBuffer_common
> >> | ReadBufferWithoutRelcache
> >> | XLogReadBufferExtended
> >> | XLogReadBufferForRedoExtended
> >> | --17.57%--btree_xlog_insert
> >
> > To move these writes out of recovery's way, we should probably just
> > run the bgwriter process during crash recovery. I'm going to look
> > into that.
>
> Sounds awesome.

I wrote a quick and dirty experimental patch to try that. I can't see
any benefit from it on pgbench with default shared buffers, but maybe
it would do better with your append test due to locality, especially
if you can figure out how to tune bgwriter to pace itself optimally.
https://github.com/macdice/postgres/tree/bgwriter-in-crash-recovery

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-08-28 06:04:04 Re: Support for OUT parameters in procedures
Previous Message Peter Eisentraut 2020-08-28 05:33:39 Re: SQL-standard function body