Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA
Date
Msg-id CA+q6zcWVxuWDfG9KGokhjxExMTo-9kf_JefHHGqVexLFaEypXw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Responses Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
> On Mon, 2 Jul 2018 at 15:54, Jesper Pedersen <jesper.pedersen@redhat.com> wrote:
>
> The patch from November 27, 2017 still applies (with hunks),
>
>   https://commitfest.postgresql.org/18/1166/
>
> passes "make check-world" and shows performance improvements.
>
> Keeping it in "Ready for Committer".

Looks like for some reason this patch is failing to attract committers, any
idea why? One of the plausible explanations for me is that the patch requires
some more intensive benchmarking of different workloads and types of lock
contention to make everyone more confident about it.

But then it's not exactly clear for me, what it has to do with NUMA? Non
uniform memory access effects were not mentioned here even once, and we're not
talking about e.g. migrating the memory between nodes - does it mean that NUMA
here is a replacement for a multi-core system? Thinking in this direction I've
performed few tests of this patch (using so far only one type of zipfian'ish
workload) on my modest few cores laptop, wondering if I can see any difference
at all. To my surprise, while on "bare" hardware I've indeed got some visible
performance improvement, when I tried to run the same tests on a postgres
inside a virtual machine under qemu-kvm, some of them were few percents slower
in comparison with the master (depending on the number of virtual cpus).
Probably it's related to the situation, when locks can behave differently with
preemtable vcpus - I'll try to perform few more rounds of testing to make clear
if it's something significant or not.

Als I wonder if it makes sense to take a look at the [1], where the similar
topic is discussed.

[1]:
https://www.postgresql.org/message-id/flat/CAPpHfdsZPS%3Db85cxcqO7YjoH3vtPBKYhVRLkZ_WMVbfZB-3bHA%40mail.gmail.com#a5e6d14c098e95e6a36ebd392f280c7a


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: variadic argument support for least, greatest function
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA