pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: grb@skogoglandskap.no
To: pgsql-bugs@postgresql.org
Subject: BUG #13493: pl/pgsql doesn't scale with cpus (PG9.3, 9.4)
Date: Tue, 07 Jul 2015 22:27:39 +0000
Message-ID: <20150707222739.1188.8068@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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).


-- 
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: <20150707222739.1188.8068@wrigleys.postgresql.org>
Permalink:  ../20150707222739.1188.8068@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20150707222739.1188.8068@wrigleys.postgresql.org

 · 

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: grb@skogoglandskap.no
  Subject: Re: BUG #13493: pl/pgsql doesn't scale with cpus (PG9.3, 9.4)
  In-Reply-To: <20150707222739.1188.8068@wrigleys.postgresql.org>
  References: <20150707222739.1188.8068@wrigleys.postgresql.org>

* 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