pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Cc: dipiets@amazon.com
Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64
Date: Wed, 08 Jan 2025 18:07:44 -0500
Message-ID: <1759000.1736377664@sss.pgh.pa.us> (raw)
In-Reply-To: <Z371r_AVOU0WCrBr@nathan>
References: <ZxgDEb_VpWyNZKB_@nathan>
	<Z37AA6-SsJoLaifa@nathan>
	<tdex7aj3zrvdu22dfgtljbrybrjezbjpr374otnadi6qxywkmc@rzxtb2fbubpy>
	<Z371r_AVOU0WCrBr@nathan>

Nathan Bossart <nathandbossart@gmail.com> writes:
> AFAICT TAS_SPIN() is only used for s_lock(), which doesn't appear to be
> used by LWLocks.  But I did retry my test from upthread without
> pg_stat_statements and was surprised to find a reproducible 4-6%
> regression.

On what hardware?

I just spent an hour beating on my M4 Pro (the 14-core variant)
and could not detect any outside-the-noise effect of this patch,
with or without pg_stat_statements loaded.  There does seem to be
a small fraction-of-a-percent-ish benefit.  But the run-to-run
variation with 60-second "pgbench -S" tests is a couple of percent,
so I can't say that that's real.

I do feel pretty sure that the patch doesn't hurt on this
class of hardware.

			regards, tom lane





view thread (22+ messages)  latest in thread

Message-ID: <1759000.1736377664@sss.pgh.pa.us>
Permalink:  ../1759000.1736377664@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1759000.1736377664@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, andres@anarazel.de, dipiets@amazon.com
  Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64
  In-Reply-To: <1759000.1736377664@sss.pgh.pa.us>

* 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