Re: [HACKERS] Fix performance of generic atomics - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Fix performance of generic atomics
Date
Msg-id 9816.1504637511@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Fix performance of generic atomics  (Jesper Pedersen <jesper.pedersen@redhat.com>)
List pgsql-hackers
Jesper Pedersen <jesper.pedersen@redhat.com> writes:
> On 09/05/2017 02:24 PM, Tom Lane wrote:
>> Hm, so if we can't demonstrate a performance win, it's hard to justify
>> risking touching this code.  What test case(s) did you use?

> I ran pgbench (-M prepared) with synchronous_commit 'on' and 'off' using 
> both logged and unlogged tables. Also ran an internal benchmark which 
> didn't show anything either.

That may just mean that pgbench isn't stressing any atomic ops very
hard (at least in the default scenario).

I'm tempted to write a little C function that just hits the relevant
atomic ops in a tight loop, and see how long it takes to do a few
million iterations.  That would be erring in the opposite direction,
of overstating the importance of atomic ops to real-world scenarios
--- but if we didn't get any win that way, then it's surely in the noise.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0