Re: WAL Insertion Lock Improvements

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WAL Insertion Lock Improvements
Date: 2023-05-10 17:10:20
Message-ID: CALj2ACWddeHz0E6uetxJdi=2xJrBdkMErw6eV9ykQ=bsNZ_qwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 9, 2023 at 9:24 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Tue, May 9, 2023 at 9:02 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Mon, May 08, 2023 at 04:04:10PM -0700, Nathan Bossart wrote:
> > > On Mon, May 08, 2023 at 05:57:09PM +0530, Bharath Rupireddy wrote:
> > >> test-case 1: -T5, WAL ~16 bytes
> > >> test-case 1: -t1000, WAL ~16 bytes
> > >
> > > I wonder if it's worth doing a couple of long-running tests, too.
> >
> > Yes, 5s or 1000 transactions per client is too small, though it shows
> > that things are going in the right direction.
>
> I'll pick a test case that generates a reasonable amount of WAL 256
> bytes. What do you think of the following?
>
> test-case 2: -T900, WAL ~256 bytes (for c in 1 2 4 8 16 32 64 128 256
> 512 768 1024 2048 4096 - takes 3.5hrs)
> test-case 2: -t1000000, WAL ~256 bytes
>
> If okay, I'll fire the tests.

test-case 2: -T900, WAL ~256 bytes - ran for about 3.5 hours and the
more than 3X improvement in TPS is seen - 3.11X @ 512 3.79 @ 768, 3.47
@ 1024, 2.27 @ 2048, 2.77 @ 4096

test-case 2: -T900, WAL ~256 bytes
clients HEAD PATCHED
1 1394 1351
2 1551 1445
4 3104 2881
8 5974 5774
16 12154 11319
32 22438 21606
64 43689 40567
128 80726 77993
256 139987 141638
512 60108 187126
768 51188 194406
1024 48766 169353
2048 46617 105961
4096 44163 122697

test-case 2: -t1000000, WAL ~256 bytes - ran for more than 12 hours
and the maximum improvement is 1.84X @ 1024 client.

test-case 2: -t1000000, WAL ~256 bytes
clients HEAD PATCHED
1 1454 1500
2 1657 1612
4 3223 3224
8 6305 6295
16 12447 12260
32 24855 24335
64 45229 44386
128 80752 79518
256 120663 119083
512 149546 159396
768 118298 181732
1024 101829 187492
2048 107506 191378
4096 125130 186728

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
image/png 15.9 KB
image/png 14.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-05-10 17:18:22 Re: Discussion: psql \et <trigger_name> -> edit the trigger function
Previous Message Kirk Wolak 2023-05-10 17:08:23 Re: Discussion: psql \et <trigger_name> -> edit the trigger function