pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Kevin Grittner <kgrittn@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Kevin Grittner <kgrittn@postgresql.org>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Date: Wed, 13 Apr 2016 08:59:42 -0700
Message-ID: <20160413155942.fx6bnpwpoanbn3i4@alap3.anarazel.de> (raw)
In-Reply-To: <CACjxUsO_B8yQcA=ZhDh1Zn3Z+McgJZP0jcbvFRmuLup8XQkudQ@mail.gmail.com>
References: <20160412185625.g7ixnlpwaqvsqt7v@alap3.anarazel.de>
	<20160413025214.GA954515@alvherre.pgsql>
	<20160413030530.dfldqhmtojo222c4@alap3.anarazel.de>
	<CA+TgmoZqN0xevR+1pZ6j-99-ZCBoOphr-23tiREb+QW1Eu=KOA@mail.gmail.com>
	<20160413150116.ixitwrmpdc2shcfy@alap3.anarazel.de>
	<CACjxUsO_B8yQcA=ZhDh1Zn3Z+McgJZP0jcbvFRmuLup8XQkudQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2016-04-13 10:31:19 -0500, Kevin Grittner wrote:
> With a real-world application with realistic simulated user load
> there was no such regression and a big gain in performance over
> time, so we're talking about adjusting how broad a range of
> workloads it benefits.

I think it depends very heavily on the type of application. To be
affected you need a high rate of snapshot acquisitions. So lots of small
statements, or possibly longer running stuff involving volatile
functions (which IIRC get new snapshots continually).

> but as an example, if I only see such regression on a Linux kernel
> with version a version < 3.8 I am going to be less concerned about
> getting something into 9.6, since IMO it is completely irresponsible
> to run a NUMA machine with 4 or more nodes on an OS with a substandard
> NUMA scheduler.  I'm not sure when 3.8 became available, but according
> to Wikipedia Version 3.10 of the Linux kernel was released in June
> 2013, so it's not like you need to be on the bleeding edge to have a
> decent scheduler.

I don't think effect of adding a single spinlock (an exclusive lock!) in
a hot path is likely to be hugely dependant on the kernel version.
We've had such cases before, and felt the pain. E.g. the spinlock in the
ProcArrayLock used to be a *HUGE* contention point, and it has pretty
much the same acquisition pattern as this spinlock now.

Greetings,

Andres Freund


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (195+ messages)  latest in thread

Message-ID: <20160413155942.fx6bnpwpoanbn3i4@alap3.anarazel.de>
Permalink:  ../20160413155942.fx6bnpwpoanbn3i4@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20160413155942.fx6bnpwpoanbn3i4@alap3.anarazel.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, kgrittn@gmail.com, robertmhaas@gmail.com, alvherre@2ndquadrant.com, noah@leadboat.com, kgrittn@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
  In-Reply-To: <20160413155942.fx6bnpwpoanbn3i4@alap3.anarazel.de>
  References: <20160412185625.g7ixnlpwaqvsqt7v@alap3.anarazel.de> <20160413025214.GA954515@alvherre.pgsql> <20160413030530.dfldqhmtojo222c4@alap3.anarazel.de> <CA+TgmoZqN0xevR+1pZ6j-99-ZCBoOphr-23tiREb+QW1Eu=KOA@mail.gmail.com> <20160413150116.ixitwrmpdc2shcfy@alap3.anarazel.de> <CACjxUsO_B8yQcA=ZhDh1Zn3Z+McgJZP0jcbvFRmuLup8XQkudQ@mail.gmail.com> <20160413155942.fx6bnpwpoanbn3i4@alap3.anarazel.de>

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

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