agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: Checkpointer write combining
Date: Tue, 9 Sep 2025 16:27:47 +0300
Message-ID: <CAN55FZ3FOv+ubp4yyFKt=Rr+ceM0tfXRDVr6nKgqSyWXh8G8Gg@mail.gmail.com> (raw)
In-Reply-To: <CAAKRu_bQWv5hJH0ncbGw8BEufAxdwMw4KY0KYuYLaw6KA=fpCA@mail.gmail.com>
References: <CAAKRu_bcWRvRwZUop_d9vzF9nHAiT+-uPzkJ=S3ShZ1GqeAYOw@mail.gmail.com>
<CAAKRu_bQWv5hJH0ncbGw8BEufAxdwMw4KY0KYuYLaw6KA=fpCA@mail.gmail.com>
Hi,
Thank you for working on this!
On Tue, 9 Sept 2025 at 02:44, Melanie Plageman
<melanieplageman@gmail.com> wrote:
>
> On Tue, Sep 2, 2025 at 5:10 PM Melanie Plageman
> <melanieplageman@gmail.com> wrote:
> >
> > The attached patchset implements checkpointer write combining -- which
> > makes immediate checkpoints at least 20% faster in my tests.
> > Checkpointer achieves higher write throughput and higher write IOPs
> > with the patch.
I did the same benchmark you did and I found it is %50 faster (16
seconds to 8 seconds).
From 053dd9d15416d76ce4b95044d848f51ba13a2d20 Mon Sep 17 00:00:00 2001
From: Melanie Plageman <melanieplageman@gmail.com>
Date: Tue, 2 Sep 2025 11:00:44 -0400
Subject: [PATCH v2 1/9] Refactor goto into for loop in GetVictimBuffer()
@@ -731,6 +741,13 @@ StrategyRejectBuffer(BufferAccessStrategy
strategy, BufferDesc *buf, bool from_r
strategy->buffers[strategy->current] != BufferDescriptorGetBuffer(buf))
return false;
+ buf_state = LockBufHdr(buf);
+ lsn = BufferGetLSN(buf);
+ UnlockBufHdr(buf, buf_state);
+
+ if (!XLogNeedsFlush(lsn))
+ return true;
I think this should return false.
I am planning to review the other patches later and this is for the
first patch only.
--
Regards,
Nazir Bilal Yavuz
Microsoft
view thread (51+ messages) latest in thread
Message-ID: <CAN55FZ3FOv+ubp4yyFKt=Rr+ceM0tfXRDVr6nKgqSyWXh8G8Gg@mail.gmail.com>
Permalink: ../CAN55FZ3FOv+ubp4yyFKt=Rr+ceM0tfXRDVr6nKgqSyWXh8G8Gg@mail.gmail.com/
Also on: postgresql.org/message-id/CAN55FZ3FOv+ubp4yyFKt=Rr+ceM0tfXRDVr6nKgqSyWXh8G8Gg@mail.gmail.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: byavuz81@gmail.com, melanieplageman@gmail.com, pgsql-hackers@lists.postgresql.org, andres@anarazel.de
Subject: Re: Checkpointer write combining
In-Reply-To: <CAN55FZ3FOv+ubp4yyFKt=Rr+ceM0tfXRDVr6nKgqSyWXh8G8Gg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox