Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Keep elog(ERROR) and ereport(ERROR) calls in the cold path
Date: 2020-11-20 14:26:39
Message-ID: 9ce34f2e-bfc4-c668-a336-99520290ccdc@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-11-03 21:53, David Rowley wrote:
> On Tue, 3 Nov 2020 at 20:08, Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>>
>> On 2020-09-29 11:26, David Rowley wrote:
>>> I've marked this patch back as waiting for review. It would be good if
>>> someone could run some tests on some intel hardware and see if they
>>> can see any speedup.
>>
>> What is the way forward here? What exactly would you like to have tested?
>
> It would be good to see some small scale bench -S tests with and
> without -M prepared.
>
> Also, small scale TPC-H tests would be good. I really only did
> testing on new AMD hardware, so some testing on intel hardware would
> be good.

I did tests of elog_ereport_attribute_cold_v4.patch on an oldish Mac
Intel laptop with pgbench scale 1 (default), and then:

pgbench -S -T 60

master: tps = 8251.883229 (excluding connections establishing)
patched: tps = 9556.836232 (excluding connections establishing)

pgbench -S -T 60 -M prepared

master: tps = 14713.821837 (excluding connections establishing)
patched: tps = 16200.066185 (excluding connections establishing)

So from that this seems like an easy win.

I also tested on a newish Mac ARM laptop, and there the patch did not do
anything, but that was because clang does not support the cold
attribute, so that part works as well. ;-)

--
Peter Eisentraut
2ndQuadrant, an EDB company
https://www.2ndquadrant.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2020-11-20 14:30:25 Re: [bug+patch] Inserting DEFAULT into generated columns from VALUES RTE
Previous Message Andy Fan 2020-11-20 14:25:23 Re: Different results between PostgreSQL and Oracle for "for update" statement