From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: optimize atomic exchanges
Date: Thu, 30 Nov 2023 22:35:22 -0600
Message-ID: <20231201043522.GB1577008@nathanxps13> (raw)
In-Reply-To: <20231201035627.7xke2qvec6p5lihy@awork3.anarazel.de>
References: <20231129212905.GA1258737@nathanxps13>
<20231201031815.GA1519459@nathanxps13>
<20231201035627.7xke2qvec6p5lihy@awork3.anarazel.de>
On Thu, Nov 30, 2023 at 07:56:27PM -0800, Andres Freund wrote:
> On 2023-11-30 21:18:15 -0600, Nathan Bossart wrote:
>> Some rudimentary tests show a >40% speedup with this patch on x86_64.
>
> On bigger machines, with contention, the wins are likely much higher. I see
> two orders of magnitude higher throughput in a test program that I had around,
> on a two socket cascade lake machine. Of course it's also much less
> powerfull...
Nice. Thanks for trying it out.
One thing on my mind is whether we should bother with the inline assembly
versions. It looks like gcc has had __atomic since 4.7.0 (2012), so I'm
not sure we gain much from them. OTOH they are pretty simple and seem
unlikely to cause too much trouble.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, andres@anarazel.de
Subject: Re: optimize atomic exchanges
In-Reply-To: <20231201043522.GB1577008@nathanxps13>
References: <20231129212905.GA1258737@nathanxps13> <20231201031815.GA1519459@nathanxps13> <20231201035627.7xke2qvec6p5lihy@awork3.anarazel.de> <20231201043522.GB1577008@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox