Re: Make NUM_XLOGINSERT_LOCKS configurable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 1111hqshj(at)sina(dot)com, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Make NUM_XLOGINSERT_LOCKS configurable
Date: 2024-01-10 06:13:57
Message-ID: 2345175.1704867237@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> writes:
> On Wed, Jan 10, 2024 at 10:00 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Maybe. I bet just bumping up the constant by 2X or 4X or so would get
>> most of the win for far less work; it's not like adding a few more
>> LWLocks is expensive. But we need some evidence about what to set it to.

> I previously made an attempt to improve WAL insertion performance with
> varying NUM_XLOGINSERT_LOCKS. IIRC, we will lose what we get by
> increasing insertion locks (reduction in WAL insertion lock
> acquisition time) to the CPU overhead of flushing the WAL in
> WaitXLogInsertionsToFinish as referred to by the following comment.

Very interesting --- this is at variance with what the OP said, so
we definitely need details about the test conditions in both cases.

> Unfortunately, I've lost the test results, I'll run them up again and
> come back.

Please.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2024-01-10 06:14:25 Re: Add BF member koel-like indentation checks to SanityCheck CI
Previous Message Bharath Rupireddy 2024-01-10 06:09:11 Re: Make NUM_XLOGINSERT_LOCKS configurable