pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Graeme <graeme.b.bell@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Graeme B. Bell <grb@skogoglandskap.no>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13493: pl/pgsql doesn't scale with cpus (PG9.3, 9.4)
Date: Wed, 8 Jul 2015 03:36:16 +0200
Message-ID: <92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com> (raw)
In-Reply-To: <982A22C7-1695-4115-9197-A4D0D94C0CF4@anarazel.de>
References: <20150707222739.1188.8068@wrigleys.postgresql.org>
	<982A22C7-1695-4115-9197-A4D0D94C0CF4@anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On the machine used for this set of benchmarks, THP is set to never. I've seen this on several machines with slight variations in their configuration. 

I spent days poring over best practice guides from google and others when setting these up, and I try to stay up to date with discussion on pgsql-performance for kernel and postgresql.conf. 

- Don't have any spare machines currently, or time, to test on pg9.5. Going into hospital soon and then to a conference. Wanted to get this published first.
- may not be able to provide perf data just now. Lots of work, little time, bad health. Will try if i can though!

Graeme Bell


> On 8 Jul 2015, at 02:16, Andres Freund <andres@anarazel.de> wrote:
> 
> On July 8, 2015 12:27:39 AM GMT+02:00, grb@skogoglandskap.no wrote:
>> The following bug has been logged on the website:
>> 
>> Bug reference:      13493
>> Logged by:          Graeme Bell
>> Email address:      grb@skogoglandskap.no
>> PostgreSQL version: 9.3.9
>> Operating system:   Linux
>> Description:        
>> 
>> Hi,
>> 
>> pl/pgsql doesn't scale properly on postgres 9.3/9.4 with multiple
>> processors
>> beyond 2-3 processors for me, regardless of the machine I use or the
>> benchmark/project. 
>> 
>> I discovered this painfully during a project here where we were running
>> a
>> small 'forest simulator' in pl/pgsql on different datasets
>> simultaneously. 
>> 
>> To highlight the problem, I've provided a benchmark that demonstrates
>> two
>> problems (on my machines).
>> 
>> 1. The first problem is scaling when you have lots of pl/pgsql code
>> running
>> and doing real work. 
>> 
>> 2. The second problem is scaling when you have a table column as an
>> input
>> parameter. 
>> 
>> The benchmark results & source code are here:
>> 
>> https://github.com/gbb/ppppt
>> 
>> Another set of benchmarks showing the same phenomena on PG9.3 and PG9.4
>> can
>> be found here, under 'BENCHMARKS.md'
>> 
>> https://github.com/gbb/par_psql
>> 
>> I would be grateful if others could run the benchmark and
>> confirm/disconfirm
>> the result. 
>> 
>> If confirmed, the result may be of special interest to e.g. the postgis
>> &
>> pgrouting communities.
>> 
>> This result is from a 16-core machine with 128GB of memory and a lot of
>> random I/O capacity (there's no writing involved though other than a
>> bit of
>> WAL, and not much data, so this shouldn't matter).
> 
> That sounds odd.. Could you provide perf profiles with this running? Also have you reproduced on 9.5?
> 
> Do you have transparent huge pages disabled?
> 
> --- 
> Please excuse brevity and formatting - I am writing this on my mobile phone.
> 
> 
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs



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



view thread (12+ messages)  latest in thread

Message-ID: <92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com>
Permalink:  ../92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com/
Also on:    postgresql.org/message-id/92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com

 · 

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-bugs@postgresql.org
  Cc: graeme.b.bell@gmail.com, andres@anarazel.de, grb@skogoglandskap.no
  Subject: Re: BUG #13493: pl/pgsql doesn't scale with cpus (PG9.3, 9.4)
  In-Reply-To: <92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com>
  References: <20150707222739.1188.8068@wrigleys.postgresql.org> <982A22C7-1695-4115-9197-A4D0D94C0CF4@anarazel.de> <92E06F9B-F8CA-41D8-B9AD-056AE21F1897@gmail.com>

* 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