public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jingtang Zhang <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: [email protected]
Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64
Date: Wed, 15 Jan 2025 19:50:38 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAPsk3_Bx5PhS9A+NH7SO2K-bwrZS7q4i-WTy1Bf98j0CAEqa=g@mail.gmail.com>
References: <ZxgDEb_VpWyNZKB_@nathan>
	<CAPsk3_Bx5PhS9A+NH7SO2K-bwrZS7q4i-WTy1Bf98j0CAEqa=g@mail.gmail.com>

Hi, Nathan.

I just realized that I almost forgot about this thread :)

> The result looks great, but the discussion in [0] shows that the result may
> vary among different ARM chips. Could you provide the chip model of this
> test? So that we can do a cross validation of this patch. Not sure if compiler
> version is necessary too. I'm willing to test it on Alibaba Cloud Yitian 710
> if I have time.

I did some benchmark on Yitian 710.

On c8y.16xlarge (64 cores):

Without the patch:
  80.31%  postgres               [.] __aarch64_swp4_acq
   1.77%  postgres               [.] __aarch64_ldadd4_acq_rel
   1.13%  postgres               [.] hash_search_with_hash_value
   0.87%  pg_stat_statements.so  [.] __aarch64_swp4_acq
   0.72%  postgres               [.] perform_spin_delay
   0.44%  postgres               [.] _bt_compare

tps = 295272.628421 (including connections establishing)
tps = 295335.660323 (excluding connections establishing)

Patched:
   9.94%  postgres               [.] s_lock
   6.07%  postgres               [.] __aarch64_swp4_acq
   5.73%  postgres               [.] hash_search_with_hash_value
   2.81%  postgres               [.] perform_spin_delay
   2.29%  postgres               [.] _bt_compare
   2.15%  postgres               [.] PinBuffer

tps = 864519.764125 (including connections establishing)
tps = 864638.244443 (excluding connections establishing)


Seems that great performance could be gained if s_lock contention is severe.
This may be more likely to happen on bigger machines.

On c8y.2xlarge (8 cores), I failed to make s_lock contended severely, and
as a result this patch didn’t bring any difference outside the noise.


Regards,
Jingtang








view thread (7+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: use a non-locking initial test in TAS_SPIN on AArch64
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox