Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
Cc: Юрий Соколов <funny(dot)falcon(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA
Date: 2018-11-10 19:18:33
Message-ID: CA+q6zcWVxuWDfG9KGokhjxExMTo-9kf_JefHHGqVexLFaEypXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Mon, 2 Jul 2018 at 15:54, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-11-10 19:37:03 Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA
Previous Message Pavel Stehule 2018-11-10 18:52:33 Re: proposal: variadic argument support for least, greatest function