Re: Improving spin-lock implementation on ARM.

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Krunal Bauskar <krunalbauskar(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improving spin-lock implementation on ARM.
Date: 2020-11-27 07:23:09
Message-ID: CAPpHfdsKRz7=yUoyrM5Dw5QVgN3NXzoF-mgeWqbJiv6NiRNSZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 27, 2020 at 1:55 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Krunal Bauskar <krunalbauskar(at)gmail(dot)com> writes:
> > On Thu, 26 Nov 2020 at 10:50, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Also, exactly what hardware/software platform were these curves
> >> obtained on?
>
> > Hardware: ARM Kunpeng 920 BareMetal Server 2.6 GHz. 64 cores (56 cores for
> > server and 8 for client) [2 numa nodes]
> > Storage: 3.2 TB NVMe SSD
> > OS: CentOS Linux release 7.6
> > PGSQL: baseline = Release Tag 13.1
>
> Hmm, might not be the sort of hardware ordinary mortals can get their
> hands on. What's likely to be far more common ARM64 hardware in the
> near future is Apple's new gear. So I thought I'd try this on the new
> M1 mini I just got.
>
> ... and, after retrieving my jaw from the floor, I present the
> attached. Apple's chips evidently like this style of spinlock a LOT
> better. The difference is so remarkable that I wonder if I made a
> mistake somewhere. Can anyone else replicate these results?

Results look very surprising to me. I didn't expect there would be
any very busy spin-lock when the number of clients is as low as 4.
Especially in read-only pgbench.

I don't have an M1 at hand. Could you do some profiling to identify
the source of such a huge difference.

------
Regards,
Alexander Korotkov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2020-11-27 07:27:08 Re: Improving spin-lock implementation on ARM.
Previous Message tsunakawa.takay@fujitsu.com 2020-11-27 07:01:16 RE: Disable WAL logging to speed up data loading