From: | Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: spin_delay() for ARM |
Date: | 2020-04-13 14:46:36 |
Message-ID: | CAJ3gD9fY3Ls84-CaKSASLO1Si5sXi5MULEu-U2tQbbL241ZWFA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 11 Apr 2020 at 04:18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I wrote:
> > A more useful test would be to directly experiment with contended
> > spinlocks. As I recall, we had some test cases laying about when
> > we were fooling with the spin delay stuff on Intel --- maybe
> > resurrecting one of those would be useful?
>
> The last really significant performance testing we did in this area
> seems to have been in this thread:
>
>
https://www.postgresql.org/message-id/flat/CA%2BTgmoZvATZV%2BeLh3U35jaNnwwzLL5ewUU_-t0X%3DT0Qwas%2BZdA%40mail.gmail.com
>
> A relevant point from that is Haas' comment
>
> I think optimizing spinlocks for machines with only a few CPUs is
> probably pointless. Based on what I've seen so far, spinlock
> contention even at 16 CPUs is negligible pretty much no matter what
> you do. Whether your implementation is fast or slow isn't going to
> matter, because even an inefficient implementation will account for
> only a negligible percentage of the total CPU time - much less than 1%
> - as opposed to a 64-core machine, where it's not that hard to find
> cases where spin-waits consume the *majority* of available CPU time
> (recall previous discussion of lseek).
Yeah, will check if I find some machines with large cores.
> So I wonder whether this patch is getting ahead of the game. It does
> seem that ARM systems with a couple dozen cores exist, but are they
> common enough to optimize for yet? Can we even find *one* to test on
> and verify that this is a win and not a loss? (Also, seeing that
> there are so many different ARM vendors, results from just one
> chipset might not be too trustworthy ...)
Ok. Yes, it would be worth waiting to see if there are others in the
community with ARM systems that have implemented YIELD. May be after that
we might gain some confidence. I myself also hope that I will get one soon
to test, but right now I have one that does not support it, so it will be
just a no-op.
--
Thanks,
-Amit Khandekar
Huawei Technologies
--
Thanks,
-Amit Khandekar
Huawei Technologies
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-04-13 14:51:16 | Re: [bug] Table not have typarray when created by single user mode |
Previous Message | Amit Khandekar | 2020-04-13 14:45:53 | Re: spin_delay() for ARM |